IamGrooooot's picture
Model E: Unsupervised PCA + clustering risk stratification
53a6def
raw
history blame contribute delete
338 Bytes
"""
Labs processing utilities
"""
def add_total_labs(df):
"""
Historical features: to-date features
--------
:param df: dataframe to be updated
:return: updated dataframe with historical columns added
"""
# Add counter for rescue meds to date
df['labs_to_date'] = df.labs_to_date.cumsum()
return df