How to hide one specific cell (input or output) in IPython Notebook?

后端 未结 10 1506
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 21:53

Is there a way to selectively hide one specific input or output cell in IPython notebook?

I could only find the below code to show / hide all input cells.

h

10条回答
  •  独厮守ぢ
    2020-11-29 22:17

    Ok, after trying without success the answers here stated. I found this extension of kirbs.Hide_code nbextension It works just fine. But it is recommended to do the following:

    First of all, make sure that you have updated your jupyter, the nbconverter, the nbconverter extensiones and the jupyter serverextension. If you did that then you can do the following in the anaconda prompt (Opened with admin priviledges):

    1. pip install hide_code
    2. jupyter nbextension install --py hide_code
    3. jupyter nbextension enable --py hide_code
    4. jupyter serverextension enable --py hide_code

    Finally if you are using anaconda distribution to open your notebooks then make sure of also using these commands:

    1. jupyter nbextension install --sys-prefix --py hide_code
    2. jupyter nbextension enable --sys-prefix --py hide_code
    3. jupyter serverextension enable --sys-prefix --py hide_code

    If there are no error on the execution of these commands then you will be able to see and use the hide code options in the toolbar as it is shown here:

    Hide_code toolbar

    Done! If you use the button for exporting and voilá!

    Export Button

    Good luck

提交回复
热议问题