Created
May 3, 2019 13:02
-
-
Save karamanbk/01a383d6b428d0e8c2d58556037334c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create a new dataframe for no. of order by using quantity field | |
tx_monthly_sales = tx_uk.groupby('InvoiceYearMonth')['Quantity'].sum().reset_index() | |
#print the dataframe | |
tx_monthly_sales | |
#plot | |
plot_data = [ | |
go.Bar( | |
x=tx_monthly_sales['InvoiceYearMonth'], | |
y=tx_monthly_sales['Quantity'], | |
) | |
] | |
plot_layout = go.Layout( | |
xaxis={"type": "category"}, | |
title='Monthly Total # of Order' | |
) | |
fig = go.Figure(data=plot_data, layout=plot_layout) | |
pyoff.iplot(fig) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment