How to hide cell output in jupyter notebooks (VSCode + Python Extension)?

Viewed 11587

I use version 1.38 of VSCode in combination with the python extension (ms-python.python) to be able to modify jupyter notebooks inside of VSCode. Is there any option to hide the output of specific cells (e.g. when plotting multiple plots in one cell)?

3 Answers

Bumped into the same problem today. 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.

Put this as the first line of your cell.

%%capture 
#Then the rest of your code in the cell...

The output from that cell won't be printed inside the notebook.

Related