快好知 kuaihz订阅观点

 

【Colab系列】魔术种类

讲解对象:【Colab系列】魔术种类

作者:融水公子 rsgz

文章出处:360doc个人图书馆[其他平台均为盗版] 

ipython中魔术有两种:行魔术单元魔术

魔术

特点:命令以一个%字符开头

参数:参数仅扩展到当前行的末尾

单元魔术

特点:

1 使用%%作为标记

2 单元魔术只能用作单元格的第一行

3 每个单元只能使用一个单元魔术

参数:将声明其所在的当前行和整个单元作为参数

实例1:

%lsmagic

作用:列出所有可用的魔术,将显示当前定义的行魔术单元魔术

运行结果:

Available line magics:%alias  %alias_magic  %autocall  %automagic  %autosave  %bookmark  %cat  %cd  %clear  %colors  %config  %connect_info  %cp  %debug  %dhist  %dirs  %doctest_mode  %ed  %edit  %env  %gui  %hist  %history  %killbgscripts  %ldir  %less  %lf  %lk  %ll  %load  %load_ext  %loadpy  %logoff  %logon  %logstart  %logstate  %logstop  %ls  %lsmagic  %lx  %macro  %magic  %man  %matplotlib  %mkdir  %more  %mv  %notebook  %page  %pastebin  %pdb  %pdef  %pdoc  %pfile  %pinfo  %pinfo2  %pip  %popd  %pprint  %precision  %profile  %prun  %psearch  %psource  %pushd  %pwd  %pycat  %pylab  %qtconsole  %quickref  %recall  %rehashx  %reload_ext  %rep  %rerun  %reset  %reset_selective  %rm  %rmdir  %run  %save  %sc  %set_env  %shell  %store  %sx  %system  %tb  %tensorflow_version  %time  %timeit  %unalias  %unload_ext  %who  %who_ls  %whos  %xdel  %xmodeAvailable cell magics:%%!  %%HTML  %%SVG  %%bash  %%bigquery  %%capture  %%debug  %%file  %%html  %%javascript  %%js  %%latex  %%perl  %%prun  %%pypy  %%python  %%python2  %%python3  %%ruby  %%script  %%sh  %%shell  %%svg  %%sx  %%system  %%time  %%timeit  %%writefileAutomagic is ON, % prefix IS NOT needed for line magics.

谢谢大家的支持!可以点击我的头像,进入我的空间浏览更多文章呢

---

本站资源来自互联网,仅供学习,如有侵权,请通知删除,敬请谅解!
搜索建议:【Colab系列】魔术种类  魔术  魔术词条  种类  种类词条  系列  系列词条  Colab  Colab词条  
综合数码问答

 如何删除Word中的空白页

如果你需要删除word中的一页空白页,那么你可以使用本文提供的方法。该方法可以帮助你仅通过三步就删除word中的空白页。你可以打开“显示段落标记”来显示从哪里开...(展开)