How to remove carriage return in a dataframe
问题 I am having a dataframe that contains columns named id, country_name, location and total_deaths. While doing data cleaning process, I came across a value in a row that has '\r' attached. Once I complete cleaning process, I store the resulting dataframe in destination.csv file. Since the above particular row has \r attached, it always creates a new row. id 29 location Uttar Pradesh\r country_name India total_deaths 20 I want to remove \r . I tried df.replace({'\r': ''}, regex=True) . It isn't