We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
>>> def applym(df): ... print df.irow(0)['a'] ... return DataFrame({'a':[1],'b':[1]}) >>> df = DataFrame({'a':[1,1,1,2,3],'b':['a','a','a','b','c']}) >>> df.groupby('b').apply(applym) 1 1 2 3 a b b a 0 1 1 b 0 1 1 c 0 1 1 >>>
applym is called twice on the first group.