-1

getting these kind of errors while importing the file

import pandas
data1 = pandas.read_csv("zomato.csv")
Traceback (most recent call last):
  File "pandas\_libs\parsers.pyx", line 1149, in pandas._libs.parsers.TextReader._convert_tokens
  File "pandas\_libs\parsers.pyx", line 1279, in pandas._libs.parsers.TextReader._convert_with_dtype
  File "pandas\_libs\parsers.pyx", line 1295, in pandas._libs.parsers.TextReader._string_convert
  File "pandas\_libs\parsers.pyx", line 1518, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 3: invalid continuation byte
Sundeep Pidugu
  • 2,377
  • 2
  • 21
  • 43
sarkarX
  • 3
  • 2
  • 1
    You have some encoding issue with your `csv` hope this helps : https://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte – Sundeep Pidugu Aug 08 '19 at 11:27

1 Answers1

0

You can always pass an encoding option when you read a CSV file

data1 = pandas.read_csv('zomato.csv', encoding = "ISO-8859-1")

Refer here for other encoding options Encoding alretnatives

Sundeep Pidugu
  • 2,377
  • 2
  • 21
  • 43