Exercise

# Multiple grouped summaries

Earlier in this chapter, you saw that the `.agg()`

method is useful to compute multiple statistics on multiple variables. It also works with grouped data. NumPy, which is imported as `np`

, has many different summary statistics functions, including: `np.min`

, `np.max`

, `np.mean`

, and `np.median`

.

`sales`

is available and `pandas`

is imported as `pd`

.

Instructions

**100 XP**

- Import
`numpy`

with the alias`np`

. - Get the min, max, mean, and median of
`weekly_sales`

for each store type using`.groupby()`

and`.agg()`

. Store this as`sales_stats`

. Make sure to use`numpy`

functions! - Get the min, max, mean, and median of
`unemployment`

and`fuel_price_usd_per_l`

for each store type. Store this as`unemp_fuel_stats`

.