In [6]:
from google_ngram import *
# this is safe because there's just the one class, named Gngram
import matplotlib.pyplot as plt
%matplotlib inline

g = Gngram(['google', 'ngram'], years=[1940, 2000], case_insensitive=True)

print g.df_parents.head()

plt.plot(g.df_parents.index, g.df_parents)


      google (All)  ngram (All)
1940      0.033068     0.000000
1941      0.040585     0.000000
1942      0.037307     0.000000
1943      0.015727     0.001123
1944      0.049249     0.000000
Out[6]:
[<matplotlib.lines.Line2D at 0xc5aa9b0>,
 <matplotlib.lines.Line2D at 0xc5aa668>]

In [ ]: