While upgrading pandas from 0.7.2 to 0.9.1 we have found that groupby().max() operation now removes non-numeric columns. This broke our code in several places. Workaround is to use groupby().aggregate(np.max).
Here is an example demonstrating the problem:
output on pandas 0.7.2
ii nn ss
11 2 11 mama
22 4 22 mama
output on pandas 0.9.1
As you see, object column 'ss' is dropped in new version !!!
This was very un-intuitive.
I'll have a look. It's not obvious that this should work by default on non-numeric data
strings have __lt__() defined so the built in min() and max() work on them. If the non-numeric object supports the proper comparison methods, min() and max() aggregate functions should be non-ambiguous.
BUG: don't exclude non-numeric data in groupby.max/min. close #2700