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