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,
You can add %%capture
to the beginning of the cell.
Jupyter provides a magic cell command called %%capture
that allows you to capture all of to outputs from that cell.
You can use it like this:
%%capture test
print('test')
test.stdout
=> 'test\n'
https://ipython.readthedocs.io/en/stable/interactive/magics.html