简体   繁体   English

如何在 Jupyter Notebook Python 3.6.2 中关闭行号

[英]How to Turn Off Line Numbers in Jupyter Notebook Python 3.6.2

I tried using this code to turn off the lines:我尝试使用此代码关闭线路:

IPython.Cell.options_default.cm_config.lineNumbers = false;

And I also tried我也试过

IPython.Cell.options_default.cm_config.lineNumbers = False; IPython.Cell.options_default.cm_config.lineNumbers = False;

But I get the following error: name 'IPython' is not defined但我收到以下错误:未定义名称“IPython”

如果我正确理解您的问题,解决方案是单击 Jupyter Notebook 的“查看”选项卡内的“切换行号”。

For Jupyter 5.5.0 this also works perfectly.对于Jupyter 5.5.0,这也可以完美运行。

Esc and then L . Esc然后是L It lets you to toggle the line number on and off.它允许您打开和关闭行号。 L can be small l or caps L . L可以是小号l或大写L

Esc and 'l' will remove the numbering from current cell. Esc 和 'l' 将从当前单元格中删除编号。 Esc and 'L' will remove the numbering from all the cells of notebook. Esc 和“L”将从笔记本的所有单元格中删除编号。

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

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