The Most Profitable Store
Since we want to find the most profitable stores based on the given data, we need to group the observations in the df dataframe by the 'Store' column values and calculate the total (sum) of the 'Weekly_Sales' column for each group. Finally, we need to sort the resulting values in descending order.
Swipe to start coding
- Group the observations in the
dfdataframe by the'Store'column values. - Select the
'Weekly_Sales'column. - Calculate the total (sum) for each group.
- Sort the resulting values in descending order (not ascending).
Solution
Merci pour vos commentaires !
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Résumer ce chapitre
Expliquer le code dans file
Expliquer pourquoi file ne résout pas la tâche
Awesome!
Completion rate improved to 3.45
The Most Profitable Store
Glissez pour afficher le menu
Since we want to find the most profitable stores based on the given data, we need to group the observations in the df dataframe by the 'Store' column values and calculate the total (sum) of the 'Weekly_Sales' column for each group. Finally, we need to sort the resulting values in descending order.
Swipe to start coding
- Group the observations in the
dfdataframe by the'Store'column values. - Select the
'Weekly_Sales'column. - Calculate the total (sum) for each group.
- Sort the resulting values in descending order (not ascending).
Solution
Merci pour vos commentaires !
single