AstraAI

Tables with Pandas

Where does my allowance go?

In the curriculum:Tables (Pandas)See the map โ†’
๐ŸŽ“ School maths ยท Years 5โ€“6Statistics โ€” Group data into categories, total each and rank them.Maths by year โ†’

The Case. Your pocket money vanishes by Wednesday and you're not even sure what on โ€” snacks? a game? Where does it actually go? Let's log it in a table and add it up by category โ€” the same trick your banking app uses to show a spending breakdown.

Your tools. pandas is a spreadsheet you can ask questions to. groupby adds up spending by category.

Investigate. Press Run. The chart ranks where your money went, biggest last.

  • Add your own rows to the table.
  • Which single category eats the most?

This case is part of the Family plan

Unlock every 12โ€“15 case and the full AI, machine-learning, and deep-learning path โ€” one subscription for the whole family.

Need a hint?

groupby('item') puts all the 'snacks' rows together, then ['cost'].sum() adds them up.