4

I use Ipython Notebook for all python scripting and also making notes with markdown cells.

Sometime back I had downloaded my Ipython Notebook as xyz.py file using File>Download Notebook as .py file option.

Now I need to import the same xyz.py file back into Ipython Notebook.

How can I achieve this?

Have tried creating a new Notebook and in a cell ran

%load xyz.py

but it loads the raw contents of the file in a single cell. And does not render markdown cells and code cells content as it was there in the original Notebook.

4

1 回答 1

3

据我了解,Python .py 文件导出是一个方向过程,因为它会在此过程中丢失信息。

如果您希望重新打开笔记本进行编辑,请使用本机 JSON (ipynb) 格式

现在,您的选择是手动从源代码中重建单元格。

于 2015-07-06T04:32:20.207 回答