I import data from csv and read it with pandas:
train = pd.read_csv('yelp_review_full_csv/train.csv',
header=None,
names=['Class', 'Review'])
reviews = train['Review']
and willing to get rid of new line symbols - \n using regex:
print(reviews[3])
rex = re.sub("\\n+", " ", reviews[3])
print(rex)
which gives me an output:
... much. \n\nI think ...
... much. \n\nI think ...
If I copy the output and check it with regex, then I have a desired result. I guess there should be something with csv reading, any recommendations?