leo_kor

Untitled

Apr 12th, 2021
550
1 day
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if source_costs['costs'].sum() != 0:
  2.    
  3.         source_costs = source_costs.groupby('costs_month').agg({'costs' : 'sum'})
  4.         source_costs = source_costs.join(cohort_sizes.set_index('first_order_month'))
  5.         source_costs['cac'] = source_costs['costs'] / source_costs['n_buyers']
  6.  
  7.         # display(source_costs)
  8.  
  9.         # ROMI
  10.         output = output.div(source_costs['cac'], axis=0)
  11.  
  12.         # визуализируем ROMI
  13.         plt.figure(figsize=(13, 9))
  14.         plt.title('ROMI источника №{},  июнь 2017 - май 2018 гг.'.format(source))
  15.         sns.heatmap(output, annot=True, fmt='.2f', linewidths=1, linecolor='gray', cmap='crest');
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×