0

I am trying to load an excel file online. This this my path directory. C:\Users\Don.A.Charles\Downloads\Practice\sorted_data.xlsx

However, I am trying to load the file through Jupyter Notebook Online with no success https://jupyter.org/try-jupyter/lab/

Can anyone suggest anything to amend the code to allow the program to load the data? This is the code below

import pandas as pd import numpy as np from sklearn import preprocessing import matplotlib.pyplot as plt df=pd.read_excel(r"C:\Users\Don.A.Charles\Downloads\Practice\sorted_data.xlsx") 

I am receiving the error FileNotFoundError: [Errno 44] No such file or directory: 'C:\Users\Don.A.Charles\Downloads\Practice\sorted_data.xlsx'

5
  • 1
    The server which runs the Jupyter Notebook Online has no access to your computer where the file is stored. Commented May 27, 2022 at 16:00
  • You need to load the file to Jupyter file system instead of reading from local drive. Commented May 27, 2022 at 16:03
  • Ok, so how do I load the file to the Jupyter online system? Commented May 27, 2022 at 16:12
  • There is an "Upload Files" button, upper-left. Commented May 27, 2022 at 16:20
  • I upload it from the button from the upper left. I typed the code with no success df=pd.read_excel("sorted_data.xlsx") Commented May 27, 2022 at 17:00

2 Answers 2

0

You can not access local files from an online server like that.

You will need to upload the file to some storage that is accessible in https://jupyter.org/ or some external place (Google Drive/Drop box etc.) from where you can load it through http.

Sadly do not have enough experience with jupyter.org it self to know are they supporting file upload.

Sign up to request clarification or add additional context in comments.

Comments

0

It might be a little daunting, but you'll have more flexibility if you run Jupyter locally, on your own machine.

The easiest way to do this is probably to install Anaconda. Then open an Anaconda prompt from the Start menu. Use the cd command to change directories to your project directory (e.g. a python_projects folder in your home directory, call it what you like). Then type jupyter notebook and now you're running locally. Then you can load the file with the command you were using before.

2 Comments

Some form of miniconda may be easier. The install conda install notebook then installs everything necessary. Opening a notebook is then just jupyter notebook.
I have Anaconda and Jupyter on my computer at home. But I don't have it at work. So I was trying to run Jupyter online. Thanks for the assistance anyway.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.