python replace text \n in dataframe code example
Example 1: replace column values pandas
df['column'] = df['column'].str.replace(',','-')
df
Example 2: removing new line character in python from dataframe
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>)