如何在Jupyter Notebook中复制多个输入单元格 [英] How to copy multiple input cells in Jupyter Notebook

查看:1627
本文介绍了如何在Jupyter Notebook中复制多个输入单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我只想复制(Ctrl + C)来自多个单元格的代码部分,而不复制输出或In[1]:Out[1]:

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 the easiest way to do so?

推荐答案

在处于命令模式(蓝色模式)的单元格上时,只需按Shift + DownArrowShift + UpArrow进行选择多个单元格.按ctrl + C.就是这样.您一次复制了整个选定的代码.它不会影响您是否具有单元格输出.

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.

命令模式: Jupyter Notebook具有两种不同的键盘输入模式.编辑模式允许您在单元格中键入代码或文本,并以绿色单元格边框指示.命令模式将键盘绑定到笔记本级别的命令,并由带有蓝色左边界的灰色单元格边框指示.

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.

这篇关于如何在Jupyter Notebook中复制多个输入单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆