本文介绍了IPython Notebook以前的单元格内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在IPython-Notebook单元格中获取上一个(上面)单元格内容?
Is it possible in an IPython-Notebook cell to get the previous (above) cell content ?
我可以看到以前的输出具有%capture magic function但我不知道找不到如何获取上一个单元格内容。
I can see previous output with %capture magic function but I don't find how to get the previous cell content.
推荐答案
我没有找到如何获取前一个内容单元格
I didn't find how to get the previous content cell in a cell.
但我找到了另一个解决方案,创建了一个自定义魔术笔记本功能来捕获单元格内容并使用它。
But I found another solution, creating a custom magic notebook function to capture the cell content and work with that.
这篇关于IPython Notebook以前的单元格内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!