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

查看:28
本文介绍了是否可以在 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.

有什么办法可以做到这一点?

Any way I can do this?

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

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.

更具体地说,您需要安装名为 Document Tools 的 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

The Calico Document Tools extensions adds section moving, heading numbering, table of contents, and bibliography support. Demonstration of use: 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天全站免登陆