collapse cell in jupyter notebook

前端 未结 12 1296
长发绾君心
长发绾君心 2020-12-22 17:00

I am using ipython Jupyter notebook. Let\'s say I defined a function that occupies a lot of space on my screen. Is there a way to collapse the cell?

I want the func

12条回答
  •  旧时难觅i
    2020-12-22 17:23

    The jupyter contrib nbextensions Python package contains a code-folding extension that can be enabled within the notebook. Follow the link (Github) for documentation.

    To install using command line:

    pip install jupyter_contrib_nbextensions
    jupyter contrib nbextension install --user
    

    To make life easier in managing them, I'd also recommend the jupyter nbextensions configurator package. This provides an extra tab in your Notebook interface from where you can easily (de)activate all installed extensions.

    Installation:

    pip install jupyter_nbextensions_configurator
    jupyter nbextensions_configurator enable --user
    

提交回复
热议问题