How to copy multiple input cells in Jupyter Notebook

前端 未结 5 1460
别跟我提以往
别跟我提以往 2021-02-05 05:12

Basically I want to copy (Ctrl+C) only the code portions from multiple cells without also copying the output or the In[1]: and Out[1]:

What is

5条回答
  •  清歌不尽
    2021-02-05 06:01

    When you are on a cell in Command mode(blue color mode), simply press Shift + DownArrow or Shift + UpArrow to select multiple cells. Press ctrl + C. And that's it. You have copied your entire selected code at once. It doesn't affect whether you have cell outputs.

    Command mode: The Jupyter Notebook has two different keyboard input modes. Edit mode allows you to type code or text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level commands and is indicated by a grey cell border with a blue left margin.

提交回复
热议问题