pandas convert column to string inplace code example
Example 1: pandas change column to a string
total_rows['ColumnID'] = total_rows['ColumnID'].astype(str)
Example 2: in dataframe particular column to string
df["fruit"] = df["fruit"].astype("|S")