We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d38c0d commit a9210beCopy full SHA for a9210be
python_model/load_data.py
@@ -67,7 +67,7 @@ def csv_df(self, csv_fields):
67
def pre_process(self, df):
68
print("Note: pre-process changes the dataframe inplace.")
69
# remove new line char
70
- df['text'].replace(regex=True,inplace=True,to_replace=r'\\n',value=r'')
+ df['text'].replace(regex=True,inplace=True,to_replace='(\\n|\\r|\\r\\n)',value='')
71
# remove https links
72
df['text'].replace(regex=True,inplace=True,to_replace=r'(http|https):\/\/[^(\s|\b)]+',value=r'')
73
# remove user name
0 commit comments