• 数据分析利器---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中输入指令:

    1. (base) C:\Windows\system32>jupyter notebook --generate-config
    2. 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的快捷方式)

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

  • 相关阅读:
    学习c++的第十三天
    002:vue+leaflet 加载多种形式的高德地图 (示例代码)
    win10 kms activator
    day068:字符流读、写数据,及其注意事项、flush和close方法、字符缓冲流
    EasyNLP集成K-BERT算法,借助知识图谱实现更优Finetune导读
    Pycharm连接远程服务器 导入远程包时本地显示红色解决方法
    mybatis-plus中更新null值的问题
    vue--push,pop,unshift,shift,reverse,splice,sort数组修改产生视图更新
    含文档+PPT+源码等]精品微信小程序ssm图书借阅到期提醒功能实现[包运行成功]小程序毕业设计Java项目源码
    letsencrypt + centsos7.9 + docker + express 搭建https环境
  • 原文地址:https://blog.csdn.net/turui/article/details/127136130