The Most Profitable Periods
Good, now we know that the given data are weekly. Let's find out what weeks were the most profitable by comparing the total for each week.
Task
Swipe to start coding
- Group the observations in the
df
dataframe by the'Date'
column values. - Select the
'Weekly_Sales'
column. - Calculate the total (sum) for each group.
- Sort values in descending order (not ascending).
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 3.45
The Most Profitable Periods
Swipe to show menu
Good, now we know that the given data are weekly. Let's find out what weeks were the most profitable by comparing the total for each week.
Task
Swipe to start coding
- Group the observations in the
df
dataframe by the'Date'
column values. - Select the
'Weekly_Sales'
column. - Calculate the total (sum) for each group.
- Sort values in descending order (not ascending).
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 3.45SectionΒ 3. ChapterΒ 5
single