@@ -497,6 +497,28 @@ index are the group names and whose values are the sizes of each group.
497497
498498 ``nth `` can act as a reducer *or * a filter, see :ref: `here <groupby.nth >`
499499
500+ Decimal columns are "nuisance" columns that .agg automatically excludes in groupby.
501+
502+ If you do wish to aggregate them you must do so explicitly:
503+
504+ .. ipython :: python
505+
506+ from decimal import Decimal
507+ dec = pd.DataFrame(
508+ {' name' : [' foo' , ' bar' , ' foo' , ' bar' ],
509+ ' title' : [' boo' , ' far' , ' boo' , ' far' ],
510+ ' id' : [123 , 456 , 123 , 456 ],
511+ ' int_column' : [1 , 2 , 3 , 4 ],
512+ ' dec_column1' : [Decimal(' 0.50' ), Decimal(' 0.15' ), Decimal(' 0.25' ), Decimal(' 0.40' )],
513+ ' dec_column2' : [Decimal(' 0.20' ), Decimal(' 0.30' ), Decimal(' 0.55' ), Decimal(' 0.60' )]
514+ },
515+ columns = [' name' ,' title' ,' id' ,' int_column' ,' dec_column1' ,' dec_column2' ]
516+ )
517+
518+ dec.groupby([' name' , ' title' , ' id' ], as_index = False ).sum()
519+
520+ dec.groupby([' name' , ' title' , ' id' ], as_index = False ).agg({' dec_column1' : ' sum' , ' dec_column2' : ' sum' })
521+
500522 .. _groupby.aggregate.multifunc :
501523
502524Applying multiple functions at once
0 commit comments