Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to copy a cell from one jupyter notebook to another?

I am trying to copy cells from one jupyter notebook to another. How this is possible?

like image 735
Ahmad Sultan Avatar asked Oct 28 '16 16:10

Ahmad Sultan


People also ask

How do you break a cell into two Jupyter notebooks?

There are commonly known keyboard shortcuts such as Ctrl + Shift + - to split the cell, Shift + M to merge multiple cells, and Shift + Down / Up to select the cells below or above the selected one.


1 Answers

This feature has been introduced in Jupyter Notebook 5.0. Use pip install notebook --upgrade to upgrade to the latest release.

The old shortcuts C, V and X work only for copying and pasting inside one notebook. In order to do it across tabs, you should use Ctrl-C and Ctrl-V (Cmd-C and Cmd-V on Mac).

Note on multiple cells: currently (jupyter 6.0.0) on Mac+chrome using shift-click to select the cells then cmd-C does NOT work, while using the keyboard with shift-down-arrow does! (thanks drevicko for pointing this out)

like image 125
Nikolai K. Avatar answered Sep 24 '22 05:09

Nikolai K.