SyntaxFix
Write A Post
Hire A Developer
Questions
Using .apply() with a lambda conversion function also works in this case:
.apply()
lambda
total_rows['ColumnID'] = total_rows['ColumnID'].apply(lambda x: str(x))
For entire dataframes you can use .applymap(). (but in any case probably .astype() is faster)
.applymap()
.astype()