Jupyter笔记本新单元格类型默认

jey*_*bee 8 jupyter-notebook

当我使用jupyter笔记本时,

我希望新细胞成为"降价"类型.

默认情况下,新单元格的类型为"code".我应该修改哪个配置文件以及我应该更改哪个变量?

小智 9

转到site-packagespython环境的目录并进行修改site-packages/notebook/static/notebook/js/main.min.js

找到类似的东西

Notebook.options_default = {
    // can be any cell type, or the special values of
    // 'above', 'below', or 'selected' to get the value from another cell.
    default_cell_type: 'code'
};
Run Code Online (Sandbox Code Playgroud)

改变default_cell_type: 'code'default_cell_type: 'markdown'


joe*_*lom 6

在 JupyterLab 中,您可以转到Settings -> Advanced Settings manager -> Notebook“用户首选项”,然后添加以下内容:

{
    "defaultCell": "markdown"
}
Run Code Online (Sandbox Code Playgroud)