Google Cloud Platform, Vertex AI, Machine Learning, Data Science, Hands On Tutorials.
df_agg['last_purchase_brand'].isin(target_brands)*1 df_agg['age'] = df_agg['age'].astype(float) # Remove last item of sequence features to avoid target leakage : for col in aggregation_columns: df_agg[col] = df_agg[col].apply(lambda x: ";".join(x.split(";")[:-1]))