def create_aggregate()

in functions/source/loop/loop_lambda.py [0:0]


def create_aggregate(df):

    df_ = df.rename(columns = {'collection_dt_tm':'Positive blood collection date','beg_effective_dt_tm':'Nursing unit (ICU) admission date',
              'end_effective_dt_tm':'Nursing unit (ICU) discharge date','admit_dt_tm':'Admission date (begin of stay)',
                'first_activity_start_dt_tm':'Catheter insertion','last_activity_end_dt_tm':'Catheter removal',
              'PR':'Number_of_Reviews'})
    
    bad_columns = ['Unnamed: 0','transfer_in_to_collect', 'transfer_out_to_collect','ce_dynamic_label_id','line_remove_to_collect','line_insert_to_collection','encntr_num','collection_date_id']
    for c in bad_columns:
        if c in df_.columns:
            df_ = df_.drop(columns=c)

    return df_