美文网首页
jupyter notebook& ipython

jupyter notebook& ipython

作者: VanCare | 来源:发表于2017-05-14 14:11 被阅读0次

jupyter

#CMD#
activate python35 #切换py35环境
ipython #打开ipython交互内核
jupyter notebook #打开web版notebook

快捷键

执行当前cell,并自动跳到下一个cell:Shift Enter
执行当前cell,执行后不自动调转到下一个cell:Ctrl-Enter
当前的cell进入编辑模式:Enter
退出当前cell的编辑模式:Esc
删除当前的cell:双D
为当前的cell加入line number:单L
将当前的cell转化为具有n级标题的maskdown:单n
为一行或者多行添加/取消注释:Crtl /

magic命令

#############notebook############
%pylab #添加pylab
%lsmagic    #列出可用的magic命令,%line command    %%cell command
%load test.py   #导入当前路径下的一个python文件
%load http://.....   #导入网络上的文件
%run file.py    #运行文件
!python --version  #加!作为CMD命令输出
%pwd    #当前工作目录
%matplotlib inline    #弹不出图像框时在开头加入
%dubug #内部命令 up  #内部命令 down  #内部命令 print val  #内部命令 quit
%timeit sum(range(100))
%%timeit
blabla...
%prun 
%%prun
blabla...

ipython
Accessing Documentation with ?
Accessing Source Code with ??
Exploring Modules with Tab Completion
Ctrl-r Reverse-search through command history

相关文章

网友评论

      本文标题:jupyter notebook& ipython

      本文链接:https://www.haomeiwen.com/subject/czrqxxtx.html