In [1]:
import ICO
import os
import pandas as pd
import time
The Data
object is initialized with the path to the directory of .pickle files. On creation it reads in the pickle files, but does not transform the data.
In [2]:
data = ICO.Data(os.getcwd()+'/data/')
The data
object can be accessed like a dictionary to the underlying Dataframes
. These will be transformed on their first access into a normalized form. (This might take awhile for the first access)
In [3]:
start = time.time()
data["all_encounter_data"]
print(time.time() - start)
In [4]:
data["all_encounter_data"].describe(include='all')
Out[4]:
In [5]:
data["all_encounter_data"].columns.values
Out[5]:
In [6]:
data['all_encounter_data'].shape[0]
Out[6]:
In [12]:
data['all_encounter_data'].to_pickle('all_encounter_data_Dan_20170415.pickle')
In [8]:
start = time.time()
data["all_person_data"]
print(time.time() - start)
In [9]:
data["all_person_data"].describe(include='all')
Out[9]:
In [10]:
data["all_person_data"].columns.values
Out[10]:
In [11]:
data['all_person_data'].shape[0]
Out[11]:
In [13]:
data['all_person_data'].to_pickle('all_person_data_Dan_20170415.pickle')
In [ ]: