Python Language Pandas Transform: Preform operations on groups and concatenate the results