Advertisement
Dodma

Untitled

Jun 18th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. new_for_romi['romi'] = new_for_romi['ltv'] / new_for_romi['cac']
  2. romi = new_for_romi.pivot_table(
  3. index='first_order_month',
  4. columns='cohort_lifetime',
  5. values='romi',
  6. aggfunc='mean')
  7. romi.index = romi.index.strftime("%m/%Y")
  8. plt.figure(figsize=(13, 9))
  9. plt.title('ROMI')
  10. sns.heatmap(romi, annot=True, fmt='.1f', linewidths=1, linecolor='gray')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement