Last active
September 10, 2024 02:58
-
-
Save karamanbk/314d3d5483b9be1d2cc7f9694368f3bc to your computer and use it in GitHub Desktop.
Hi Baris,
Thank you so much for this wonderful report!
I was wondering why I am getting such error for:
Line Number 95
total_user_count = tx_retention[tx_retention.MinPurchaseYearMonth == selected_month].MinPurchaseYearMonth.count()
error:
AttributeError: 'DataFrame' object has no attribute 'MinPurchaseYearMonth'
Thanks in advance,
Jeanet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Barış, thanks for the code it is very helpful for me.
I am not getting right the Monthly Order Count of orders in my df. So I think there ir a mistake in the code, look:
In [28]:
tx_monthly_sales = tx_uk.groupby('InvoiceYearMonth')['Quantity'].sum().reset_index()
you are adding all the qty of products sold.Also, look a the output table the # of transactions says 298,101 which is more than your whole df.
Unless you mean this table is the total count of the # of products sold, which I think it's the value that we obtained.
Also the monthly order average, I would way that it should say that is the average price of the product per month because the value obtained is not taking into account the whole transaction but each product and obtains the mean.
In [33]:
tx_monthly_order_avg = tx_uk.groupby('InvoiceYearMonth')['Revenue'].mean().reset_index()
I am new with python so, I really have no idea how to obatin the average revenue per order and the total number of orders, ja!
Please let me know your comments, probably I am just confused.
Thank you again for this analysis, it's pretty good.