2

This is the file created as temp.cvs

temp.csv

I've made the above file into temp.csv. Then ran the following.

df=pd.read_csv("temp.csv")
df

Then I got

ParserError: Error tokenizing data. C error: Expected 1 fields in line 9, saw 5

So I tried

df=pd.read_csv("temp.csv",error_bad_lines=False)
df

and got.

{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf840

0 {\fonttbl\f0\fnil\fcharset0 HelveticaNeue;}

1 {\colortbl;\red255\green255\blue255;\red53\gre...

2 {*\expandedcolortbl;;\cssrgb\c27059\c27059\c2...

3 \paperw11900\paperh16840\margl1440\margr1440\v...

4 \deftab560

5 \pard\pardeftab560\slleading20\partightenfactor0

I still do not know what the problem is... Please HELP me...

0

2 Answers 2

7

To fix that you need to add the separator in the code:

df = pd.read_csv("temp.csv", sep=";")

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

Comments

0

Can you try this:

df = pd.read_csv('temp.csv',sep='\t',
                  lineterminator='\r',
                  error_bad_lines=False)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.