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
After double click
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?
the last line of the cell, use a command like %%hide output , and the output would be hidden after finished running.
Press 'control-shift-p', that opens the command palette. Then type 'clear cell output'. That will let you select the command to clear the output.
It seems to be that the shortcuts from jupyter notebook are integrated into the jupyter notebook in visual studio code. If you press "o" on a cell, it will hide the cell output.
Stopping a process or restarting a Jupyter Notebook To interrupt a cell execution, you can click the ■ “stop” button in the ribbon above the notebook, or select “Interrupt Kernel” from the Kernel menue.
Add ;
by the end of the cell to hide the output of that cell.
In the newer versions(5.0.0 at the time I'm writing this), pressing o in the command mode hides the output of the cell in focus. The same happens if you triple click in front of the output.
o is
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With