Issue with `read_csv` due to Low Space on C Drive

Title: Issue with read_csv due to Low Space on C Drive

Description:

I am encountering a problem with the read_csv function in Python. My C drive has low space, and I am using an SSD. The CSV file is available on both C and D drives, but the function still doesn’t work. How can I resolve this issue?

Import pandas as pd

Reading the CSV file

df = pd.read_csv(r"C:\Users\Waliullah\Desktop\webscraping\gporders.csv")

Displaying the first few rows of the dataframe

print(df.head())


Screenshot_1
Screenshot_2

The error has nothing to do with disk space.

What the error is saying is that the file is not written in unicode (utf-8).

Try reading the file using the Windows legacy cp1252 encoding.
Sorry, I do not know how to tell pandas which encoding to use.

1 Like