code
code
# Ensure all categorical features are of type 'category' for efficient memory usage
df['region'] = df['region'].astype('category')
df['loyalty_years'] = df['loyalty_years'].astype('category')
df['joining_month'] = df['joining_month'].astype('category')
df['promotion'] = df['promotion'].astype('category')