A Simple Example

This notebook shows the last time it was run, displays a dataframe, and then plots it.

If you run mkdocs serve in the directory above this, and make changes here you'll see your docs update a moment after saving the notebook.

import pandas as pd
import numpy as np
import datetime
%matplotlib inline

The last run time

print(f"This notebook last ran at {datetime.datetime.now()}")
This notebook last ran at 2018-09-18 09:47:56.497449

Let's make a dataframe

df = pd.DataFrame({"time":np.arange(0, 10, 0.1)})
df["amplitude"] =  np.sin(df.time)
df
time amplitude
0 0 0
1 0.1 0.0998334
2 0.2 0.198669
3 0.3 0.29552
4 0.4 0.389418

And plot it :)

df.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x1187f6eb8>

png