IPython Deep Dive: Python Data Science Handbook, Ch. 1¶
Reading: "IPython: Beyond Normal Python", by Jake VanderPlas — Python Data Science Handbook, Chapter 1.

1. Help & Documentation¶
object?— shows the docstring for any object, function, or methodobject??— shows the underlying source code, when available
2. Tab Completion¶
object.+TAB— lists an object's attributes and methods- Wildcard matching with
*— e.g.str.*find*?
3. Magic Commands¶
%timeit/%%timeit— time a line / a whole cell%history— show past commands%run— execute an external.pyscript%load— load a script's contents into a cell
4. Input / Output History¶
In[]andOut[]— every input and output is numbered and stored_— the last output;__— the one before thatOut[2]— re-access any earlier output by its number
5. Shell Access from IPython¶
!ls,!pwd— run any shell command with a!prefixcontents = !ls— capture shell output into a Python variable!cp {filename} {dest}— pass Python variables back into the shell
6. Errors & Debugging¶
%xmode— control how much detail a traceback shows%debug— drop into an interactive debugger at the point of the last error
7. Profiling & Timing¶
%prun— profile a statement, function by function%lprun— line-by-line profiling (needsline_profiler)%memit— measure memory use of a statement