I have a pandas data frame 'data' that I want to export to csv. It works fine, but some lines are completely messed up. I use: data.to_csv('data.csv')
I tried altering the encoding and dropping index, but it didn't work. The first picture are the correct rows, and the second one the rows that got messed up. When looking at the messed up rows i figured the problem might be that the text data uses the delimiter \r to separate lines and is exported incorrectly. How can I fix this?
Thanks!

