
- Jupyter 教程
- Jupyter - 首页
- IPython
- IPython - 简介
- IPython - 安装
- IPython - 入门
- 运行和编辑 Python 脚本
- IPython - 历史命令
- IPython - 系统命令
- IPython - 命令行选项
- 动态对象自省
- IPython - I/O 缓存
- 设置 IPython 为默认 Python 环境
- 导入 Python Shell 代码
- IPython - 嵌入 IPython
- IPython - 魔法命令
- Jupyter
- Project Jupyter - 概述
- Jupyter Notebook - 简介
- 使用在线 Jupyter
- 安装和入门
- Jupyter Notebook - 仪表板
- Jupyter Notebook - 用户界面
- Jupyter Notebook - 单元类型
- Jupyter Notebook - 编辑
- Jupyter Notebook - Markdown 单元
- 代码单元魔法函数
- Jupyter Notebook - 绘图
- 转换笔记本
- Jupyter Notebook - IPyWidgets
- QtConsole
- QtConsole - 入门
- QtConsole - 多行编辑
- QtConsole - 内联图形
- QtConsole - 保存为 Html
- QtConsole - 多个控制台
- 连接到 Jupyter Notebook
- 使用 github 和 nbviewer
- JupyterLab
- JupyterLab - 概述
- 安装和入门
- JupyterLab - 界面
- JupyterLab - 安装 R 内核
- Jupyter 资源
- Jupyter - 快速指南
- Jupyter - 有用资源
- Jupyter - 讨论
Jupyter Notebook - 代码单元魔法函数
在本章中,让我们了解代码单元魔法函数及其功能。
%%html
此代码单元魔法函数将代码单元的内容呈现为 html 脚本。

%%js 或 %%javascript
您可以使用此代码单元魔法命令在 Jupyter Notebook 单元格中嵌入 javascript 代码。


Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified expert to boost your career.
%%writefile
使用此命令将代码单元的内容写入文件。

广告