- - - - - mixing functions with arraysdictsor series is not problem as everything gets converted to arrays internallyin [ ]key_list ['one''one''one''two''two'in [ ]people groupby([lenkey_list]min(out[ ] one - - - - two one - - - two - - - - - grouping by index levels final convenience for hierarchically-indexed data sets is the ability to aggregate using one of the levels of an axis index to do thispass the level number or name using the level keywordin [ ]columns pd multiindex from_arrays([['us''us''us''jp''jp'][ ]]names=['cty''tenor']in [ ]hier_df dataframe(np random randn( )columns=columnsin [ ]hier_df out[ ]cty us jp tenor - - - - - - - - - in [ ]hier_df groupby(level='cty'axis= count(out[ ]cty jp us data aggregation by aggregationi am generally referring to any data transformation that produces scalar values from arrays in the examples above have used several of themsuch as meancountmin and sum you may wonder what is going on when you invoke mean(on groupby object many common aggregationssuch as those found in table - have optimized implementations that compute the statistics on the dataset in place howeveryou are not limited to only this set of methods you can use aggregations of your data aggregation www it-ebooks info