-1

I am a newbie to python and data analysis, when I try to read .csv files by pandas, I got the information as below.

‘Utf-8’ code can’t decode byte 0xcd in position 0: invalid continuation byte.

This is not the first time I got this problem, unfortunately I forgot how to solve it. Could someone help me?

my code:

import pandas as pd
df = pd.read_csv(‘C:/Users/36373748/files/zllr.csv’)
rlandster
  • 7,294
  • 14
  • 58
  • 96
Nick Gao
  • 203
  • 1
  • 2
  • 7

1 Answers1

0

Thanks everyone! I tried the pd.read_csv commend with encoding =‘gbk’, and it finally worked!

Nick Gao
  • 203
  • 1
  • 2
  • 7