Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created September 12, 2022 11:11
Show Gist options
  • Save Abhayparashar31/4ee6133e4c3322b6e560f046c32a3810 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/4ee6133e4c3322b6e560f046c32a3810 to your computer and use it in GitHub Desktop.
def plot_connections_on_different_months(df):
data = df['Connected_on'].dt.month.value_counts()
fig = px.bar(x = data.index, y=data.values,labels={
'x':'Month',
'y':'Number of Connections'})
fig.update_xaxes(tickvals=[1,2,3,4,5,6,7,8,9,10,11,12],
ticktext=['Jan','Feb','Mar','Apr','May','june','july','Aug','Sep','Oct','Nov','Dec'])
return fig
plot_connections_on_different_months(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment