删除单元格 ipython 2.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23619989/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Delete cell ipython 2.0
提问by pbreach
There is probably a very easy solution to this but I'm not sure what it is. Delete cell command in IPython 1.2 used to be:
对此可能有一个非常简单的解决方案,但我不确定它是什么。IPython 1.2 中的删除单元格命令曾经是:
ctrl-m d
according to the help menu in version 2.0 it says,
根据 2.0 版中的帮助菜单,它说,
Shift-d: delete cell(press twice)
I've tried holding shift
then pressing d
twice and various combinations with shift
and d
and nothing seems to work.. Am I just doing this wrong or the command is actually not working? Any help would be appreciated.
我试过按住shift
然后按d
两次和各种组合shift
和d
和似乎没有任何作用..我只是做错了还是命令实际上不起作用?任何帮助,将不胜感激。
采纳答案by dmvianna
In the new IPython cells could have two states: when it has a green selection rectangle around it you can edit what's inside; when it has a grey rectangle around it you edit the cell itself (copy/paste/delete). Enter/Return makes it go green, Esc makes it go grey. When it is gray, 'dd' will delete it.
在新的 IPython 单元格中可以有两种状态:当它周围有一个绿色的选择矩形时,你可以编辑里面的内容;当它周围有一个灰色矩形时,您可以编辑单元格本身(复制/粘贴/删除)。Enter/Return 使其变为绿色,Esc 使其变为灰色。当它是灰色时,'dd' 将删除它。
回答by agconti
To delete a cell, just click on the part margin part of the cell, the part that is not code or output ( right below the Ln[7]: in the picture below), and simply press the d
key twice. Clicking there selects the entire cell and allows you to use keyboard short cuts like delete and or create a cell above or below.
要删除一个单元格,只需单击单元格的部分边距部分,即不是代码或输出的部分(下图中 Ln[7]: 的正下方),只需按d
两次键即可。单击此处可选择整个单元格,并允许您使用键盘快捷键,例如删除和/或在上方或下方创建单元格。