In [1]:
%matplotlib inline
import pandas as pd
In [2]:
from IPython.core.display import HTML
css = open('style-table.css').read() + open('style-notebook.css').read()
HTML('<style>{}</style>'.format(css))
Out[2]:
In [8]:
titles = pd.DataFrame.from_csv('data/titles.csv', index_col=None)
titles.head()
Out[8]:
In [7]:
cast = pd.DataFrame.from_csv('data/cast.csv', index_col=None)
cast.head()
Out[7]:
In [21]:
t = titles
t = t.title.value_counts()
t.head(10)
Out[21]:
In [ ]:
In [50]:
t = titles
t = t[(t.year >= 1930) & (t.year < 1940)]
t = t.year.value_counts()
t.head(3)
Out[50]:
In [ ]:
In [63]:
t = titles
t = t.groupby(t.year // 10 * 10)
t.size().plot(kind='bar')
Out[63]:
In [ ]:
In [83]:
t = titles
t = t[t.title == 'Hamlet']
t = t.groupby(t.year // 10 * 10)
t.size().plot(kind="bar")
Out[83]:
In [ ]:
In [10]:
c = cast
c = c[c.character == 'Rustler']
c = c.groupby(c.year // 10 * 10)
c.size().plot(kind='bar')
Out[10]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: