jupyter .ipynb转.py
来源:互联网 发布:mac底部菜单隐藏了 编辑:程序博客网 时间:2024/05/29 14:12
jupyter 写完的代码是在*.ipynb文件下的,在其他的python代码中想引入,会报错,所以需要将其转为.py格式的标准python代码。
jupyter nbconvert –to script demo.ipynb
例如:
try:
!jupyter nbconvert –to script demo.ipynb
except:
pass
阅读全文