Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Aug 15, 2022
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()
AttributeError: 'DataFrame' object has no attribute 'MinPurchaseYearMonth'
Thanks in advance,
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:
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.
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.