简体   繁体   English

将 VS Code Jupyter Notebook 中的 Output 折叠成可滚动的 Window

[英]Collapse Output In VS Code Jupyter Notebook into Scrollable Window

Is there a way to show the output such as a very long data-frame in a scrollable window in VS Code Jupyter Notebook?有没有办法在 VS Code Jupyter Notebook 的可滚动 window 中显示 output 等非常长的数据框?

I am aware that pressing letter "o" allows you to collapse all output. But having the scrollable window is still preferable as it allows you to check the output while referring to other windows.我知道按字母“o”可以折叠所有 output。但是拥有可滚动的 window 仍然更可取,因为它允许您在引用其他 windows 时检查 output。

I also checked this link but couldn't get it work.我还检查了此链接,但无法正常工作。

Per the comments, a workaround to trigger the scrollable window is to add a print statement to the cell output.根据评论,触发可滚动窗口的解决方法是向单元格输出添加打印语句。 For example print("foo") at the beginning or end of a cell.例如在单元格的开头或结尾print("foo")

There is a beta feature for scrolling now.现在有一个用于滚动的测试版功能。 Simply add "notebook.experimental.outputScrolling": true to settings.json .只需将"notebook.experimental.outputScrolling": true添加到settings.json即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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