Pandas Library won't find a specific excel file

In the youtube video I watched it said that you only had to put the file name in so I’m not sure if we’re supposed to use the file path.

Idle is unable to find the file as well so the fact that I’m using google colab doesn’t affect it

CSV’s don’t work either

You’re working with Google Colab? Have you read up in their pretty extensive documentation about how to load data and load files? Colab is a cloud service. Python is running in a sandbox on a remote Google host. Do you think that host can just read any files on its host or on your local host? If that were so, it would pose an enormous security risk for Google/all users.

So, if you have local files (=files on your own machine) you want to use in Colab, you first need to upload them to Google drive or follow another way to make them accessible to Colab.

Sadly I already did upload them to my drive and there there in a datasets folder

Ok, then what is the problem? You need to use the full path of the file in the datasets folder from which Google Colab can read.

Google Colab is a pretty nice environment to explore ML, and it seems generous that Google gives access to some very powerful machines, but this is really not intended for use by absolute beginners: you will sadly learn almost nothing there unless you already have a basic understanding of Python. The best way to get this basic understanding imo is to run things on your own machine - for instance, using IDLE, which is an interactive Python interpreter shipped with Python itself.

I have idle it’s just I don’t really know how to use it

I also have pycharm and spyder but spyder won’t recognize the pip install commands i gave it and pycharm cost money

IDLE and Jupyter are free. VSCode is also free. The PyCharm community edition is afaik also free. All are excellent programs. IDLE is probably the easiest to use, so I advise to start with that. Once you’re a bit familiar with that, you may want to switch over to Jupyter - since many of those ML/data science tutorials are presented with Jupyter notebooks.

  • The extension is not relevant for finding the file. You can use any extension or no extension in the file path. What is very relevant is just using the correct reader function (read_csv, read_excel, etc).
  • Using an absolute path is good advice.

I checked that to

How do you get an absolute file path

I meant how to copy and paste a file path from excel or something

Do you know how to get a file from google drive becuase maybe I can do it that way

I’m sorry, I don’t. You will have to search in the Google documentation for this.

it’s fine i’m just wondering

  1. Google Drive won’t work for accessing multiple files
  2. I’m now using Visual Studio Code and it also is unable to find the file
  3. I’m going to see if there are any websites or videos for this so I can see if I’m correct or if I need to change something.

Have you tried Googling for how to do it?

I quickly found this:

How to Read a File from Drive in Google Colab | Saturn Cloud Blog

No so oI’ll check it out