Wednesday, August 15, 2018

Python dataframe remove non ascii words

df.text.replace({r'[^\x00-\x7F]+':''}, regex=True, inplace=True)
text is the column name in dataframe df

No comments:

Post a Comment