There's more...

If you do not use an aggregating function with agg, pandas raises an exception. For instance, let's see what happens when we apply the square root function to each group:

>>> flights.groupby('AIRLINE')['ARR_DELAY'].agg(np.sqrt)
ValueError: function does not reduce
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.140.204