是否可以在IPython Notebook中创建输入单元的分组? [英] Is it possible to create grouping of input cells in IPython Notebook?

查看:160
本文介绍了是否可以在IPython Notebook中创建输入单元的分组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在IPython Notebook上进行数据分析时,我常常觉得需要向上或向下移动几个相邻的输入单元,以便更好地分析故事。

When I do data analysis on IPython Notebook, I often feel the need to move up or down several adjacent input cells, for better flow of the analysis story.

我预计,一旦我创建了一个标题,如果我移动标题,那个标题下的所有单元格都会一起移动。但事实并非如此。

I'd expected that once I'd create a heading, all cells under that heading would move together if I move the heading. But this is not the case.

我可以这样做吗?

编辑:澄清一下,我当然可以单独移动单元格,键盘快捷键很方便;但我正在寻找的是一种分组单元格的方法,以便我可以一起移动(甚至删除)它们。

To clarify, I can of course move cells individually, and the keyboard shortcuts are handy; but what I'm looking for is a way to group cells so that I can move (or even delete) them all together.

推荐答案

我使用一个鲜为人知的扩展,它完全符合你的要求(即一旦我创建了一个标题,如果我移动标题,那个标题下的所有单元格将一起移动)。它是 Calico套件的一部分,但可以单独安装。

I use a little-known extension, which does exactly what you want (i.e. "once I'd create a heading, all cells under that heading would move together if I move the heading"). It is part of the Calico suite, but can be installed separately.

更具体地说,您需要安装名为文档工具的 Calico Notebook Extension 。来自描述:

More specifically, you need to install a Calico Notebook Extension named Document Tools. From the description:


Calico文档工具扩展添加了部分移动,标题编号,目录和参考书目支持。
演示使用: https://www.youtube.com/watch?v=YbM8rrj-Bms

我不知道维基页面上给出的安装说明是否针对IPython 3.0进行了更新(2015年2月) ,但实际上是 BitBucket上的源代码

I don't know whether the instructions of installation given on the wiki page are updated for IPython 3.0 (february 2015), but the source-code on BitBucket actually is.

目前我无法安装IPython 3.0,但自从去年夏天以来,我很乐意在IPython 2.x中使用此扩展程序。它很棒,也许不如asif.m的建议 IPython笔记本的集体剪切 - 复制粘贴(通过方式,尚未更新为IPython 3.0),但恕我直言更快,更合乎逻辑。

I cannot install IPython 3.0 for the moment, but I gladly use this extension with IPython 2.x since last summer. It's great, perhaps less versatile than the asif.m's suggestion Collective Cut-Copy-Paste for IPython Notebooks (which, by the way, has not been updated for IPython 3.0), but IMHO faster and more logical.

这篇关于是否可以在IPython Notebook中创建输入单元的分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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