Is there a way to convient fold/unfold an ipython cell?

Now ipython notebook could easily hide the output part of a cell by double clicking the left margin of the output. But I havn't figure out a way to hide the whole cell content.


Solution 1:

Not sure if this is still relevant but the following code folding extension may help:

https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding

Solution 2:

If you are running juptyter, then this is relevant: collapse cell in jupyter notebook

In my case, I like the hide_cost extension. Install as

pip3 install hide_code

Visit https://github.com/kirbs-/hide_code/ for more info about this extension.