-1

I have this kind of error in jupyter notebook, is there something needs to be done?

error


ParserError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_15164\57077545.py in ----> 1 pd.read_csv('datawisata.csv', skip_blank_lines=False)

apparently i have blank data from my travel.csv.

this is view of the blank

ParserError: Error tokenizing data. C error: Expected 1 fields in line 54, saw 2

any suggestions how to parse it ?? or maybe it can't be done so i need to change it into 'blank' words first?

8
  • 2
    You cut most of the error. Please don't use images but post formatted text into the question Commented Dec 21, 2022 at 12:33
  • Can you include a few lines of your input file? Commented Dec 21, 2022 at 12:38
  • You still didn't post the actual error... Commented Dec 21, 2022 at 12:55
  • 1
    This shouldn't be so hard. Please post a minimal reproducible example of your code, the file and the full error you get. No images Commented Dec 21, 2022 at 13:02
  • 1
    Does this answer your question? Python Pandas Error tokenizing data Commented Dec 21, 2022 at 13:02

1 Answer 1

-1

first thing this is pandas not numpy :p

second, you can keep blanck cells in pandas as empty string with the parameter keep_default_na=False as you can see in this answer here

you can do similarly in numpy as answere here

Sign up to request clarification or add additional context in comments.

1 Comment

The code is not even able to read the file so this has nothing to do with it...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.