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