-
-
Save greister/d29c1bf17422e828c334d49ba15223f7 to your computer and use it in GitHub Desktop.
[pandas] replace newlines,tabs,carriage returns in fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# got to handle both escaped and literal | |
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment