E
E
Eva072015-10-24 17:00:35
Python
Eva07, 2015-10-24 17:00:35

How to import csv file into iPython without UnicodeDecodeError?

There is a file Direct.csv (Cyrillic) and ipython3.4
I write:
import pandas as pd
Location=r'C:\Users\Victor\Desktop\Direct.csv'
df=pd.read_csv(Location)
Outcome: UnicodeDecodeError: 'utf- 8' codec ca
n't decode byte 0xca in position 0: invalid continuation byte
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
throughtheether, 2015-10-24
@throughtheether

Try setting the encoding:
Alternatively, try moving the csv file to a directory without Cyrillic characters in the path.

E
Eva07, 2015-10-24
@Eva07

throughtheether , I already tried it.
Outcome:
Error tokenizing data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question