Jupyter Notebook: command for hide the output of a cell?

前端 未结 7 701
被撕碎了的回忆
被撕碎了的回忆 2021-02-03 17:30

In my notebook, I have a cell returning temp calculation results. It\'s a bit long, so after it is run, I want to hide it and when needed, to show it.

To do it manually,

7条回答
  •  失恋的感觉
    2021-02-03 18:00

    Not exactly what you are after, but the effect might be good enough for your purposes:

    Look into the %%capture magic (https://nbviewer.jupyter.org/github/ipython/ipython/blob/1.x/examples/notebooks/Cell%20Magics.ipynb). It lets you assign that cell output to a variable. By calling that variable later you could see the output.

提交回复
热议问题