convert column to string pandas dataframe 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")