python - 如何在 Jupyter 上以 HTML 格式导出当前笔记本

标签 python html jupyter

如何将当前笔记本(从笔记本内部,使用 Python)导出到 HTML(到自定义输出路径)?

最佳答案

通过查看 nbconvert docs , 你会看到你可以使用 --to html方法:

import os

os.system('jupyter nbconvert --to html yourNotebook.ipynb')

这将在 yourNotebook.ipynb 文件夹中创建一个 yourNotebook.html 文件。

关于python - 如何在 Jupyter 上以 HTML 格式导出当前笔记本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35896866/

相关文章:

python - 为什么 Django 中的一些 include 需要字符串,而其他一些需要变量名?

python - urllib2获取乱码字符串而不是页面源码

html - 为什么在将 html 元素的不透明度更改为 0.5 后,不能将 h1 元素的不透明度更改回 1?

javascript - 从 HTML5 存储打开 PDF

python - 在 Jupyter 中,如何默认使用 matplotlib ggplot 样式?

python - 在 mongodb 中保存 python 列表

python - 如何在python中显示没有秒的区域设置敏感时间格式

HTML/CSS 元素位置

python-3.x - 无法在 Windows 7 中从 cmd 启动 Jupyter 实验室

python - 将 jupyter ipython notebook 导出为 pdf