Skip to content

Instantly share code, notes, and snippets.

@h-okay
Last active Jan 5, 2022
Embed
What would you like to do?
add_clv
final = rfm[['rfm_segment']].merge(cltv_final, on='Customer ID') # Merging RFM
final.rename(columns={'scaled_clv': '6m_scaled_clv', 'clv': '6m_clv'},
inplace=True)
final = add_clv(final, cltv_df, 1)
final = add_clv(final, cltv_df, 12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment