You can open existing Jupyter Notebook files (. ipynb) in the Jupyter Notebook dashboard by clicking on the name of the file in the dashboard (e.g. filename. ipynb ).
open() still works in Jupyter notebooks. Go to here and click on launch binder . The session that spins up lacks pandas and the following code pasted in a notebook still works to make a text file, named demofile. txt , and then read it in using open() .
In[1]:
path='/Users/apple/Downloads/train.csv'
open(path).readline()
Out[1]:
FileNotFoundError Traceback (most recent call
last)
<ipython-input-7-7fad5faebc9b> in <module>()
----> 1 open(path).readline()
FileNotFoundError: [Errno 2] No such file or directory:
'/Users/apple/Downloads/train.csv'
I'm confused a lot.I thought this code is exactly similar with many tutorials, and I'm sure I have this file in the right path, but why does it not works?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With