Customer Segmentation in Python
Karolis Urbonas
Head of Data Science, Amazon
Easiest way to visualize cohort analysis
Includes both data and visuals
Only few lines of code with seaborn
retention.round(3)*100
import seaborn as sns import matplotlib.pyplot as plt
plt.figure(figsize=(10, 8))
plt.title('Retention rates')
sns.heatmap(data = retention, annot = True, fmt = '.0%', vmin = 0.0, vmax = 0.5, cmap = 'BuGn')
plt.show()
Customer Segmentation in Python