Group By Function | Pandas Data Analysis Tutorial #1 | Retail Example

preview_player
Показать описание
If you are data analyst, learning the Pandas groupby function is essential for you to segment and aggregate your data. Similar to a pivot table this allows you to group categories into different aggregations quickly to provide immediate insight.

In this example we will analyze an online retail dataset and answer business questions like:

1.Find out which customers placed the most and fewest orders.
2.Find out which countries placed the fewest orders.
3.Find out which customers spent the most money.
5.Find out which customer spent the most money on one item.
6.Find out which month had the most orders.
7. What is the most ordered product by country

Get the dataset here:

Don't hesitate to dive into the mini-case studies and questions and create your own answers using groupby. Learn by doing!
______________________________________________________________________
______________________________________________________________________

#DataAnalysis
# Pandas
#Python
Рекомендации по теме
Комментарии
Автор

Very lucky that I've found your this video. I find it very helpful for me. Thanks very much.

eatbreathedatascience
Автор

In the video, I think a single line is representing an order. If the items under one invoice are considered as an order, then we can use the function nunique()

tommyhao
Автор

thank you, clear and easy to follow and learn!

YY-bkbc
Автор

Cool! thanks!
But I've faced with one issue.
The initial dtype of "InvoiceDate" column was float64, but not object, and when I applied to_datetime function, all the dates became 1970-01-01.
How can I fix it?

andriim