Skip to content

Instantly share code, notes, and snippets.

@pycaret
Created May 27, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pycaret/1c781ea61f04698946bb8f9d38634b21 to your computer and use it in GitHub Desktop.
Save pycaret/1c781ea61f04698946bb8f9d38634b21 to your computer and use it in GitHub Desktop.
# creating a copy of data
data2 = data.copy()
data2.dropna(axis=0, inplace=True)
data2['Converted'] = data2['Converted'].replace({1 : 'Yes', 0 : 'No'})
# plotly visual
import plotly.express as px
fig = px.scatter(x=data2['Total Time Spent on Website'], y=data2['Asymmetrique Activity Score'],
color = data2['Converted'], template = 'plotly_white',
facet_col = data2['Lead Origin'], facet_row = data2['Do Not Email'],
title = 'Lead Conversion by Total time spent on Website, Activity Score and Lead Origin',
labels = {'x' : 'Total Time Spent on Website', 'y' : 'Activity Score'})
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment