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

cqcn1991 picture cqcn1991 · May 11, 2016 · Viewed 54.8k times · Source

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, I can double click the left side of the output, to hide it

enter image description here

After double click enter image description here

But is there any way I can do this by code? For example,

the last line of the cell, use a command like %%hide output, and the output would be hidden after finished running.

Additionally, can I get this feature in output HTML?

Answer

Raniere Silva picture Raniere Silva · Jul 11, 2016

Add ; by the end of the cell to hide the output of that cell.