pandas modifier la colonne en une chaîne
total_rows['ColumnID'] = total_rows['ColumnID'].astype(str)
Embarrassed Elk
total_rows['ColumnID'] = total_rows['ColumnID'].astype(str)
for colname in df.columns:
try:
df[colname] = df[colname].astype('str')
print(f"{colname} converted")
except ValueError:
print(f"{colname} failed")
# Some of operations look like
df['B'] = df['B'].str.replace('replace_this', 'new_character')
df['B'] = df['B'].astype(int)
# don't forget to upvote :)