jfilter / clean-text

🧹 Python package for text cleaning
Other
953 stars 79 forks source link

doesn't work with dataframe (csv file) #7

Closed widedM closed 4 years ago

widedM commented 4 years ago

Hi, i have a csv file with multiple columns: post_id, post_text and im trying to clean the post_text which is a dataframe and i read it from a csv file. The problem that the clean method doesn't take all the text but it tooks some word from every line of the dataframe ! please help. you can find a txt file (csv are not allowed here) and two screenshots, one is for real data and the other is for the output of clean()

clean data

posts.txt

jfilter commented 4 years ago

Change the first line to: d=data['Post Message'].tolist()

This is not a problem of this library but a 'feature' of pandas. I personally also find it unintuitive.