Notebook Extensions


In [1]:
import pandas as pd
import numpy as np

from pivottablejs import pivot_ui
print "Hi"


Hi

In [2]:
df = pd.read_csv("../data/Restaurant_Inspection_Scores.csv")

In [3]:
df.head()


Out[3]:
Restaurant Name Zip Code Inspection Date Score Address Facility ID Process Description
0 15th Street Cafe 78701 12/05/2013 97 303 W 15TH ST\nAUSTIN, TX 78701\n(30.277501963... 2801033 Routine Inspection
1 15th Street Cafe 78701 12/02/2014 93 303 W 15TH ST\nAUSTIN, TX 78701\n(30.277501963... 2801033 Routine Inspection
2 15th Street Cafe 78701 06/18/2014 97 303 W 15TH ST\nAUSTIN, TX 78701\n(30.277501963... 2801033 Routine Inspection
3 15th Street Cafe 78701 05/22/2013 91 303 W 15TH ST\nAUSTIN, TX 78701\n(30.277501963... 2801033 Routine Inspection
4 15th Street Cafe 78701 05/13/2015 97 303 W 15TH ST\nAUSTIN, TX 78701\n(30.277501963... 2801033 Routine Inspection

In [4]:
pivot_ui(df)


Out[4]:

In [5]:
df['bin_score'] = pd.cut(df.Score, bins = np.arange(30, 105, 5))

pivot_ui(df[['bin_score', 'Zip Code']])


Out[5]:

In [ ]:


In [ ]:


In [ ]: