Screenshots, especially alone, aren’t sufficient to provide details of what you want to do and to help us sort out why it isn’t working.
Major point here is that you don’t show what file you are trying to read into Pandas because the screenshot cuts off the end of the filepath. Also it doesn’t show the full traceback so the information that would give isn’t fully there. Always include a description in text and any code you are trying to use as code text in the post.
That all said…
Are you trying to read into Pandas auto.csv
? I see that file there in the session now. So the cell that is #19 in the screenshot should have to code:
import pandas as pd
df = pd.read_csv("auto.csv")
Please if that isn’t what you are trying to do, describe the situation better?
If you are trying to get a file that is online somewhere?
I gather this file is online. But I have no idea where because I cannot see the URL and so I cannot test and maybe tell you why your approach isn’t working. Please provide the full link in text.
I will add the foolproof way is to download the file to you local machine as you would a normal file you wanted to work with on your machine, as if the source data or the server hosting it is only available temporarily. Then with that file on your local machine’s file system hierarchy you can then drag and drop it in to the same directory in JupyterLite where you notebook is. In this example, you’d drag and drop from your local machine into the file navigator pane on the left side in your screen shot.
You should think of the Pyodide kernel as a remote machine even though technically it all happens in your local machine. Pyodide running in your browser doesn’t have access to your local file system.
That route of downloading to your local machine and then putting it into the JupyterLite session is the foolproof way that will work all the time; however, obviously though that is not the most convenient, especially if you repeating it a lot. And so if you supply the URL I can test if you should be able to provide pd.read_csv()
that particular URL and expect it to work or not. (Honestly I’ve switched between using pyscript, JupyterLite, py.cafe, and a typical ipykernel so much lately, I cannot keep straight what limitations or approaches are needed in theory for providing a URL for the three pyodide-based options [the first three in my list] right now. Sometimes the theory doesn’t apply to certain .csv
s for other reasons because of the two servers or networks involved.)
Another thing to consider here is why you are working in JupyterLite? (I can tell because the ‘Python (Pyodide)’ kernel in the upper right side in the kernel indicator.) Is that necessary for your work? For novices, the limitations of JupyterLite sometimes make it not the best choice because they read things possible in JupyterLab and don’t realize that won’t quite work as simply in JupyterLite at this time. See the last paragraph here or the top of my reply here if you want to consider that option now.