Python pd.read_csv Execution Error

Asked 2 years ago, Updated 2 years ago, 40 views

import pandas as pd

fec = pd.read_csv('‪‪‪D:/Moon Hyun Jae/P00000001-ALL.csv')

This error appears when you do so.

FileNotFoundError: File b'\xe2\x80\xaa\xe2\x80\xaa\xe2\x80\xaaD:/Moon Hyun Jae/P00000001-ALL.csv' does not exist

The file definitely exists and the name is the same, but it's blocked from loading data.
I'm just trying to get the csv file into Pandas, but I keep getting errors.
The same error occurs for both jupyter notebook and idle.

How do I solve this? I'm not getting along with my studies.
In the middle, I changed / to \ and changed it to r'D but it didn't work, so I'm posting a question.
I look forward to your kind cooperation.

python pandas

2022-09-22 19:15

1 Answers

I googled \xe2\x80\xaa and found that it is a UTF-8 encoding of the symbol meaning read from left to right.

I looked up more and found out if this would help you specify encoding on the first line of the source

# -*- coding: utf-8 -*-


2022-09-22 19:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.