how to get multiple conditional operations after a Pandas groupby?,return df.groupby('A').apply(my_func)