How can I reduce the file size of my iPython notebook?
jupyter-notebook
Solution
You can try following steps since it worked for me:
Select the "Cell" -> then select "All Outputs" -> There you will find "Clear" option select that.
And then save the file.
This will reduce the size of your file (From MBs to kbs). It will also reduce the time to load the notebook next time you open it in your browser.
As per my understanding this will clear all the output created after execution of the code. Since Notebook is holding code+images+comments in addition to this its also holding the out put in that file therefore it will increase the size of the notebook.
Problem
I have an IPython notebook which is several megabytes big although the code inside is just about 100 lines. I think it is that huge because I load several images inside. I would like to add this notebook to a git repository. However, I don't want to upload something that big which can easily be generated again. Is it possible to save just the code of an IPython notebook to reduce its size?