http://stackoverflow.com/questions/19267029/why-pandas-transform-fails-if-you-only-have-a-single-column/19271841#19271841

Even though this is a correct error message, when it comes out of a groupby assignment via transform its 'unclear'. (as the assignment when the rhs has a single-column 'works')

In [48]: df = DataFrame(index=range(3))

In [49]: df
Out[49]: 
Empty DataFrame
Columns: []
Index: [0, 1, 2]

In [50]: df['foo'] = DataFrame(index=range(3))
---------------------------------------------------------------------------
ValueError: Wrong number of items passed 1, indices imply 0

Comment From: mroeschke

Looks like the error message is better now which we have coverage for so closing

ValueError: Cannot set a DataFrame with multiple columns to the single column foo