Skip to content

Instantly share code, notes, and snippets.

@moezali1
Last active July 19, 2022 04:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save moezali1/2624c9a5eaf78d9a7ffa1b97195a4812 to your computer and use it in GitHub Desktop.
Save moezali1/2624c9a5eaf78d9a7ffa1b97195a4812 to your computer and use it in GitHub Desktop.
import plotly.express as px
fig = px.scatter(x=data['tenure'], y=data['TotalCharges'],
color = data['Churn'], template = 'presentation',
opacity = 0.5, facet_col = data['Contract'],
title = 'Customer Churn by Tenure, Charges, and Contract Type',
labels = {'x' : 'Customer Tenure', 'y' : 'Total Charges $'})
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment