Click here to Skip to main content
16,022,069 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I hope this message finds you well. I am currently working on a data analysis project using Python, specifically with a dataset related to Walmart sales. However, I am encountering a persistent issue when trying to read CSV files using Pandas.

Despite following the necessary steps to convert my dataset into CSV format, I keep receiving a FileNotFoundError indicating that the specified file (e.g., train.csv) cannot be found. I have confirmed that the files are located in the correct directory and are saved with the appropriate CSV file extension.

Here are the steps I have taken so far:

Verified the file names and ensured they are saved as CSV files.
Used absolute paths in my code to reference the files.
Checked the current working directory in my script.
Activated the correct virtual environment in my Python setup.
Listed the files in the directory using a simple Python script, which confirmed that the CSV files are present.
Despite these efforts, I am still facing issues. I would greatly appreciate any guidance or suggestions you might have to resolve this problem.

Thank you for your assistance!

What I have tried:

Verified the file names and ensured they are saved as CSV files.
Used absolute paths in my code to reference the files.
Checked the current working directory in my script.
Activated the correct virtual environment in my Python setup.
Listed the files in the directory using a simple Python script, which confirmed that the CSV files are present.
Despite these efforts, I am still facing issues. I would greatly appreciate any guidance or suggestions you might have to resolve this problem.
Posted
Comments
Pete O'Hanlon 3-Oct-24 3:16am    
As you haven't shown us your code, we're going to find it incredibly difficult to help you diagnose this.
[no name] 3-Oct-24 4:42am    
Despite what you report the issue is a simple one. For some reason the path that you are using to access the files is incorrect in some way. But, as Pete already mentions above, we cannot help you without seeing the actual code, and a listing of the directory containing the files.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900