Magic functions

Magic functions are functions that are built into specific notebook kernels and should be written at the top of an input cell. Notebooks with Python kernels contain the following type of magic commands:

  • Line magics: Line magics start with a single % symbol and encompass a broad range of functionality. For example, entering %quickref in a cell will pull up a reference list of magic function calls and system commands:

  • Cell magics: Cell magics are denoted by two %% symbols and execute a process on an entire cell. Most cell magics allow you to run or render cells in different languages. For example, using the %%html command will render your cell block in HTML. 

Note that some magics, such as timeit, can be used as both line and cell magics—the functionality will change, depending on which type of magic you use.

A full list of magic commands can be found within the IPython documentation: https://ipython.readthedocs.io/en/stable/interactive/magics.html.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.251.37