Skip to content

Instantly share code, notes, and snippets.

View edips's full-sized avatar

Edip Ahmet Taşkın edips

View GitHub Profile
@smram
smram / pandas_newline_strip.txt
Created October 4, 2017 23:35
[pandas] replace newlines,tabs,carriage returns in fields
# got to handle both escaped and literal
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>)