Why does my PyCharm refuse to open CSV and Excel files through pandas? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does my PyCharm refuse to open CSV and Excel files through pandas?

It keeps saying it can't read some char code

1st Dec 2021, 8:50 AM
Oluyemi Tosin
Oluyemi Tosin - avatar
2 Answers
+ 1
pd.read_csv('data.csv', encoding='utf8') here you can try different encoding values or pd.read_csv('data.csv', engine='python')
1st Dec 2021, 9:26 AM
Alexey Kopyshev
Alexey Kopyshev - avatar
0
Thanks. I have tried changing the encoding to utf8 but it still keeps popping the same error. I'll try setting the engine to Python and I hope it works.
19th Dec 2021, 9:53 AM
Oluyemi Tosin
Oluyemi Tosin - avatar