why pandas transform fails if you only have a single column,df.groupby('a').transform('count')