Skip to content
Advertisement

New line character not being replaced even after trying many methods

I cannot get this to replicate outside of this file, since if I try it on a string myself it works, but for some reason not in my dataframe.

I just want to get rid of the ‘n’ characters in my strings, but its not working, as seen below.

enter image description here

I’ve tried the following, with no success

JavaScript

Advertisement

Answer

Try adding regex=True to the replace calls:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement