IPython notebooks are great! Sphinx is cool as well. Let us add the two to have better docs. Let us do a bit of IPython jugglery. This page shows a demo of using some of IPython functionality and embedding it in sphinx docs.
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline
Creating a dummy Pandas dataframe¶
df = pd.DataFrame(np.random.randn(50,2))
How does the dataframe display render?¶
5 rows × 2 columns
What about plots?¶
How about maths?¶
Here is the IPython notebook corresponding to this page and here is the github repo corresponding to this minimal example! Many people are already using this scheme. I just documented it for my benefit (and possibly someone else also may find it useful).