hello,
I am working with some data and would like to show the average order value (aov) for the different months. When I look at total revenue in the set period (£839736) and divide it by the total amount of transactions in that period (1232), it shows an average order value of £681. Is there a way this can be separated into individual months? As I know that the Average Order Value will be different for each month.
Code is below: the dataframe is stored in a variable called ikdf.
months = [month for month , df in ikdf.groupby('Month')]
invs = ikdf.groupby('Invoice ID').sum()
total_invs = len(invs)
rev = ikdf['Total Value'].sum()
aov = rev / total_invs
plt.bar(months, aov)
plt.xticks
plt.ylabel('AOV per month')
plt.xlabel('Months')
plt.show()[/inline][/python]
Sorry I cannot embed the output as an image into this box.
The output shows an average order value of £681 for all months.
Is there a way that I can separate this to show the different Average Order Values and how it varies each month?
I am working with some data and would like to show the average order value (aov) for the different months. When I look at total revenue in the set period (£839736) and divide it by the total amount of transactions in that period (1232), it shows an average order value of £681. Is there a way this can be separated into individual months? As I know that the Average Order Value will be different for each month.
Code is below: the dataframe is stored in a variable called ikdf.
months = [month for month , df in ikdf.groupby('Month')]
invs = ikdf.groupby('Invoice ID').sum()
total_invs = len(invs)
rev = ikdf['Total Value'].sum()
aov = rev / total_invs
plt.bar(months, aov)
plt.xticks
plt.ylabel('AOV per month')
plt.xlabel('Months')
plt.show()[/inline][/python]
Sorry I cannot embed the output as an image into this box.
The output shows an average order value of £681 for all months.
Is there a way that I can separate this to show the different Average Order Values and how it varies each month?