Delete Cell Ipython 2.0

Delete Cell Ipython 2.0

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:

ctrl-m d

according to the help menu in version 2.0 it says,

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.

2 Answers

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.

2

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.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.