Accessing unused columns in pivot_table
related is #6490

I am new to pandas but have run into a problem which I believe is a bug.

I tried to execute the following:

```
df_sum=pd.pivot_table(df,rows=['Konskund_MEAB','ProdID'],cols=['Year'], aggfunc=lambda x: np.average(x['snittpris'],
weights=x['Antal_forsandelser'])
```

This produce a number of errors.

The following commands produce the desired results:

```
rows = ['Konskund_MEAB','ProdID']
cols = ['Year']
g = df.groupby(rows + columns)
s_av = g.apply(lambda x: np.average(x['snittpris'], weights=x['Antal_forsandelser']))
df_av = s_av.unstack(cols)
```

Posted originally on [Stackoverflow](http://stackoverflow.com/questions/18382632/pandas-pivot-table-error-when-executing-type-error).

_Another more knowledgeable user has verified the problem._
