简体   繁体   中英

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

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 (eg when plotting multiple plots in one cell)?

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.

Seems like there's no option for that at the moment.
The official document here doesn't mention that.
https://code.visualstudio.com/docs/python/jupyter-support

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM