Skip to content

Instantly share code, notes, and snippets.

@karamanbk
Created August 23, 2019 12:07
Show Gist options
  • Save karamanbk/9470250e62f71a949a98f9bd8a73a9ab to your computer and use it in GitHub Desktop.
Save karamanbk/9470250e62f71a949a98f9bd8a73a9ab to your computer and use it in GitHub Desktop.
test_results = df_hv[df_hv.group == 'test'].purchase_count
control_results = df_hv[df_hv.group == 'control'].purchase_count
hist_data = [test_results, control_results]
group_labels = ['test', 'control']
# Create distplot with curve_type set to 'normal'
fig = ff.create_distplot(hist_data, group_labels, bin_size=.5,
curve_type='normal',show_rug=False)
fig.layout = go.Layout(
title='High Value Customers Test vs Control',
plot_bgcolor = 'rgb(243,243,243)',
paper_bgcolor = 'rgb(243,243,243)',
)
# Plot!
pyoff.iplot(fig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment