Python Forum
CSV file with irregular structure
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSV file with irregular structure
#9
It seems like every tweet which were seperated by blank lines is now seperate by blank rows.
I attached a sample which contains tweets after using that code. 

When I try to read the file and define '|' as delimiter in order to do a sentiment analysis I get this message:

Output:
CParserError: Error tokenizing data. C error: Expected 7 fields in line 24, saw 8

Sorry, I got the mistake now! 
The problem is, that some of these tweets have an extra '|' which makes everything more complicated.

Attached Files

.csv   tweets_sample2.csv (Size: 6.39 KB / Downloads: 333)
Reply


Messages In This Thread
CSV file with irregular structure - by ulrich48155 - May-16-2017, 10:40 AM
RE: CSV file with irregular structure - by Larz60+ - May-16-2017, 10:57 AM
RE: CSV file with irregular structure - by Ofnuts - May-16-2017, 12:17 PM
RE: CSV file with irregular structure - by Ofnuts - May-16-2017, 07:46 PM
RE: CSV file with irregular structure - by zivoni - May-16-2017, 11:03 PM
RE: CSV file with irregular structure - by zivoni - May-20-2017, 09:34 AM
RE: CSV file with irregular structure - by ulrich48155 - May-22-2017, 06:11 PM
RE: CSV file with irregular structure - by zivoni - May-22-2017, 07:35 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020