Python LanguagePandas Transform: Preform operations on groups and concatenate the results