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

时间:2016-11-02 14:28:05

标签: jupyter-notebook

当我使用jupyter notebook时,

我希望新细胞属于“降价”类型。

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

2 个答案:

答案 0 :(得分:9)

转到python环境的site-packages目录并修改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'
};

default_cell_type: 'code'更改为default_cell_type: 'markdown'

答案 1 :(得分:0)

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

{
    "defaultCell": "markdown"
}