I'm using ipython notebook by connecting to a server I don't know how to download a thing (data frame, .csv file,... for example) programatically to my local computer. Because I can't specific declare the path like C://user//... It will be downloaded to their machine not mine
The Jupyter Notebook has an option to export the notebook to many formats. It can be accessed by clicking File -> Download as -> PDF via LaTeX (or PDF via HTML - not visible in the screenshot). This approach requires you to install some additional packages.
You can download individual files from the file navigator (which you can get to by clicking on the Jupyter icon in the top left corner). You just need to click the checkbox next to the file you want to download and then click the "download" button at the top of the pane.
Run this in separate cell in one of the notebooks:
!tar cvfz zipname.tar.gz *
To cover more folders up the tree, write ../ before the * for every step up the directory.
tar cvfz zipname.tar.gz ../../*
The file zipname.tar.gz will be saved in the same folder as your notebook.
Also if files size is too large execute the following in same notebook block
!split -b 200m allfiles.tar.gz allfiles.tar.gz.part
Alternatively you can use this extension https://github.com/data-8/nbzip
If you are using Jupyter notebook, you can go to the "File" tab on the top left part of the notebook and click "Open". It shows you the content of the current directory. You can select your data file with different format (CSV, text, etc) and then you can download it in your local computer.
Open tab in Jupyter notebook
Download your desired file
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