using agg with numpy and groupby code example Example: movie = data.groupby('_______')['_______'].agg(['_______','mean']) planets.groupby('method')