Testing notebooks with Nikola
To create a post from a Jupyter notebook:
nikola new_post -f ipynb --tags=Nikola -t "Testing notebooks with Nikola"
nikola build
nikola serve -b
nikola github_deploy
this for inline display of matplotlib plots¶
In [1]:
%matplotlib inline
some imports¶
In [2]:
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
testing inline plots¶
In [3]:
np.random.seed(1234)
In [4]:
x = np.random.randn(1000)
In [5]:
x = np.cumsum(x)
In [6]:
df = pd.DataFrame(x, columns=['x'], index=pd.date_range(start='2000-1-1', periods=len(x)))
In [7]:
df.plot(legend=None, figsize=(10, 6), grid=True);
equations with MathJax¶
$$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$
pandas dataframes¶
In [8]:
df.head()
Out[8]:
Comments