Apply vs Transform on a group object
Hi,

I understand this ticket is a borderline usage question, but I think it may signal an example of inconsistency either in the documentation or on the way these methods work.

The original question on SO is [here](http://stackoverflow.com/questions/27517425/apply-vs-transform-on-a-group-object).

Consider the following dataframe:

```
     A      B         C         D
0  foo    one  0.162003  0.087469
1  bar    one -1.156319 -1.526272
2  foo    two  0.833892 -1.666304
3  bar  three -2.026673 -0.322057
4  foo    two  0.411452 -0.954371
5  bar    two  0.765878 -0.095968
6  foo    one -0.654890  0.678091
7  foo  three -1.789842 -1.130922
```

The following commands work:

```
> df.groupby('A').apply(lambda x: (x['C'] - x['D']))
> df.groupby('A').apply(lambda x: (x['C'] - x['D']).mean())
```

but none of the following work:

```
> df.groupby('A').transform(lambda x: (x['C'] - x['D']))
ValueError: could not broadcast input array from shape (5) into shape (5,3)

> df.groupby('A').transform(lambda x: (x['C'] - x['D']).mean())
 TypeError: cannot concatenate a non-NDFrame object
```

**Why?** [The example on the documentation](http://pandas.pydata.org/pandas-docs/stable/groupby.html#transformation) seems to suggest that calling `transform` on a group allows one to do row-wise operation processing:

``` python
# Note that the following suggests row-wise operation (x.mean is the column mean)
zscore = lambda x: (x - x.mean()) / x.std()
transformed = ts.groupby(key).transform(zscore)
```

In other words, I thought that transform is essentially a specific type of apply (the one that does not aggregate). Where am I wrong?

For reference, below is the construction of the original dataframe above:

``` python
 df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
                           'foo', 'bar', 'foo', 'foo'],
                    'B' : ['one', 'one', 'two', 'three',
                           'two', 'two', 'one', 'three'],
                    'C' : randn(8), 'D' : randn(8)})
```
