This is a dataset of Assisted Living, Nursing and Residential Care facilities in Oregon, open as of January, 2017. For each, we have:
In [32]:
import pandas as pd
import numpy as np
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
In [33]:
df = pd.read_csv('../../data/processed/facilities-before-state-updates.csv')
Those that have no offline records.
In [34]:
df[(df['offline'].isnull())].count()[0]
Out[34]:
Those that have offline records.
In [35]:
df[(df['offline'].notnull())].count()[0]
Out[35]:
In [36]:
df[(df['offline']>df['online']) & (df['online'].notnull())].count()[0]
Out[36]:
In [37]:
df[(df['online'].isnull()) & (df['offline'].notnull())].count()[0]
Out[37]:
In [38]:
df[(df['online'].notnull()) & (df['offline'].isnull())].count()[0]
Out[38]:
In [39]:
df[(df['online'].notnull()) | df['offline'].notnull()].count()[0]
Out[39]:
In [40]:
df[(df['offline'].isnull())].count()[0]/df.count()[0]*100
Out[40]:
In [41]:
df[df['offline'].notnull()].sum()['fac_capacity']
Out[41]:
In [42]:
df[df['facility_name'].str.contains('Springfield')]
Out[42]:
In [44]:
df[(df['online'].isnull())].sort_values('offline',ascending=False)
Out[44]:
In [46]:
df[df['online'].isnull()].count()
Out[46]:
In [47]:
df[(df['online'].isnull()) & (df['offline'].notnull())].count()
Out[47]:
In [48]:
df[(df['online'].isnull()) & (df['offline'].isnull())].count()
Out[48]:
In [50]:
df[df['offline'].isnull()].count()
Out[50]:
In [ ]: