Seção 1. Capítulo 4
single
Challenge: Identify Top and Bottom Products
Deslize para mostrar o menu
Tarefa
Deslize para começar a programar
Given a DataFrame with product names and sales amounts, your goal is to analyze the sales data and clearly report which products performed best and worst.
- Group the data by the
productcolumn and sum thesalesvalues for each product. - Sort the products by their total sales in descending order.
- Identify the top 2 products with the highest total sales.
- Identify the bottom 2 products with the lowest total sales.
- Print the top 2 and bottom 2 products in a clear format.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo