← All topics

Python: Aggregations And Group Operations

40 exercises3 free
  1. 01Group Df_orders By 'Status' And Compute Mean Total_amount
    Free
  2. 02Sum 'Quantity' Per Product In Df_order_items
    Free
  3. 03Multiple Aggregations On Quantity In Df_order_items
    Free
  4. 04Group Df_products By (Category_id, Product_name) To Find Mean Unit_price
    Locked
  5. 05Transform Df_order_items To Center Quantity Around Group Mean
    Locked
  6. 06Filter Df_orders By Sum Of Total_amount Per Customer_id Over 1000
    Locked
  7. 07Group Df_products By 'Category_id' And Use A Custom Median Aggregator On 'Unit_price'
    Locked
  8. 08Group Df_customers By 'City', Count Rows, Then Reset Index
    Locked
  9. 09Count Rows Per 'Status' In Df_orders
    Locked
  10. 10Within Df_order_items, Group By Product_id And Create 'Cumulative_quantity' Plus A 'Quantity_centered'
    Locked
  11. 11Average 'Unit_price' By Order_id In Df_order_items
    Locked
  12. 12Median 'Unit_price' By Category In Df_products
    Locked
  13. 13Sum Of Total_amount By Month In Df_orders
    Locked
  14. 14Max Total_amount Per Customer_id In Df_orders
    Locked
  15. 15Compute Standard Deviation Of Quantity Per Product_id In Df_order_items
    Locked
  16. 16Distinct Customer_id Count Per Order Status In Df_orders
    Locked
  17. 17Count How Many Products In Each Category_id Within Df_products
    Locked
  18. 18Cumulative Order Count Per Customer_id In Df_orders
    Locked
  19. 19Mean Of Customer_id By City In Df_customers (For Demonstration)
    Locked
  20. 20Quantity Ratio Per Product_id In Df_order_items
    Locked
  21. 21Weighted Average 'Unit_price' By Category_id In Df_products
    Locked
  22. 22Rolling Sum Of Quantity Per Product_id In Df_order_items, After Sorting By Order_id
    Locked
  23. 23Within Df_orders, Compute Expanding Sum Of Total_amount For Each Customer_id
    Locked
  24. 24Quantile Aggregator: Compute The 0.75 Quantile Of Unit_price Per Category_id In Df_products
    Locked
  25. 25Create A Cross-Tab Of City Vs Status By Merging Df_orders & Df_customers
    Locked
  26. 26Pivot Table With 'Qty_bin' Index And 'Product_id' Columns, Counting Order_id
    Locked
  27. 27Group Df_orders By 'Status', Aggregator On Total_amount With Mean & Max, Then Rename Columns
    Locked
  28. 28Rank 'Total_amount' Within Each Status Group In Df_orders
    Locked
  29. 29Find Top 3 Orders By Total_amount For Each City After Merging Df_orders & Df_customers
    Locked
  30. 30Compute Difference In Total_amount Within Each Status Group In Df_orders
    Locked
  31. 31Shift Total_amount By 1 Row Within Each Customer_id Group In Df_orders
    Locked
  32. 32Sample N=2 Rows From Each Status Group In Df_orders
    Locked
  33. 33Fill Missing Unit_price With Group Median In Df_order_items, Grouping By Product_id
    Locked
  34. 34Group Df_orders By (Employee_id, Status) And Sum Total_amount
    Locked
  35. 35Group Df_products By Category_id, Custom Aggregator For Mean_price & Sum_stock
    Locked
  36. 36Count Df_customers By City, Then Rename The Group Index To 'City_name'
    Locked
  37. 37Merge Df_orders & Df_customers, Pivot On City Vs Status Summing Total_amount, Fill Missing With 0
    Locked
  38. 38Group Df_orders By (Status, Customer_id), Sum Total_amount, Then Unstack So Status Becomes Columns
    Locked
  39. 39Re-Stack That Grouped Result From #38 Back To Row Form
    Locked
  40. 40Within Df_order_items, Group By Order_id And Normalize Quantity Using A Custom Transform Function
    Locked