Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Last active November 16, 2020 07:00
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 amankharwal/b5db7e4b859847df6d22c2124ee3c186 to your computer and use it in GitHub Desktop.
Save amankharwal/b5db7e4b859847df6d22c2124ee3c186 to your computer and use it in GitHub Desktop.
data["Year"] = data['Date'].str.split("-").str[-1]
data["Month-Year"] = data['Date'].str.split("-").str[1] + "-" + data['Date'].str.split("-").str[-1]
fig1 = px.bar(data["Month-Year"].value_counts(ascending=False),
orientation= "v",
color = data["Month-Year"].value_counts(ascending=False),
labels={'value':'Count', 'index':'Date','color':'Meter'})
fig1.update_layout(title_text="Exploring higher sales by the date")
fig1.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment