数据分析利器---jupyter

官网 https://jupyter.org/ 

  • 运行 Anaconda Prompt
  • 安装 conda install jupyter
  • 更换工作目录 cd D:\quantization\jupyter 
  • 安装插件选择工具栏
    conda install -c conda-forge jupyter_contrib_nbextensions
    conda install -c conda-forge jupyter_nbextensions_configurator
  • 将这个插件选项的工具栏添加到jupyter notebook的页面当中
    jupyter contrib nbextension install
  • 去掉勾线,打开jupyter notebook页面之后就可以看到有Nbextensions这个工具栏
    disable configuration for nbextensions without explicit 
  • jupyter的美化主题
    https://github.com/dunovank/jupyter-themes
    conda install -c conda-forge jupyterthemes
    conda update jupyterthemes
  • 使用方法如下(在jupyter notebook没有运行起来之前,在控制台下输入命令)
    #list available themes
    # onedork | grade3 | oceans16 | chesterish | monokai | solarizedl | solarizedd
    jt -l

    # select theme...
    jt -t chesterish

    # NOTE: Need to delete browser cache after running jt -r
    # If this doesn't work, try starting a new notebook session.
    jt -r

    # toggle toolbar ON and notebook name ON
    jt -t grade3 -T -N

    jt -t grade3 -N -f fira -fs 14

  • 常用的插件:
    Table of Contents
          自动生成目录插件,如果在 jupyter notebook 中使用了markdown对程序进行了解释和说明 的话,那么安装这个插件以后,会自动在大纲视图,对于阅读程序使用
    Variable Inspector
        查看变量的插件,类似于 Matlab 和 R studio 的工作空间,可以查看变量名、类型,大小,形状和值。其中变量的 shape (形状)这个参数在进行矩阵运算时,十分实用,并且这个窗口还可以调节大小,排序等功能
    ExcecuteTime
        查看代码执行时间,这个插件会代码模块最后计算该模块的计算时间和运行结束时间,美观实用。
    Hinterland
        该插件的作用在于对代码有着自动填充的功能
    Skip-Traceback
        简化如语法错误提示
    Code prettify
        格式化代码
    Codefolding
        该插件的作用在于可以将自己写的代码块折叠起来,如下图所示

  • 运行 jupyter notebook 
    默认浏览器打开,查看DataFrame的时候不要使用print函数(列表效果很差)

修改jupyter notebook的工作路径和起始位置
在Anaconda Prompt中输入指令:

(base) C:\Windows\system32>jupyter notebook --generate-config
Writing default config to: C:\Users\turui\.jupyter\jupyter_notebook_config.py

 会在C:\Users\turui\.jupyter\ 下生成配置文件 jupyter_notebook_config.py

修改C:\Users\turui\.jupyter\jupyter_notebook_config.py中:
c.NotebookApp.notebook_dir 参数,去除这一行前面的#,
注意更改代码目录位置,使用单引号,然后保存
c.NotebookApp.notebook_dir = 'D:\\quantization\\jupyter'

修改Jupyter Notebook的快捷方式
右键,属性,目标
取消参数  "%USERPROFILE%/"
右键,以管理员方式运行(Jupyter Notebook的快捷方式)

看到初始目录已经修改成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值