Loading...

Magic Command

A special IPython instruction prefixed with % (line) or %% (cell) beyond plain Python.

When to use: Quick utilities: timing code, running shell commands, writing files, hot-reloading.

Example: %timeit np.dot(a, b) calibrates and reports mean. %%writefile model.py saves the cell.

More Jupyter & Colab Glossary terms