Issue 1:
Code Sample

def test_groupby_aggregate_item_by_item(self):
def test_df():
s = pd.DataFrame(np.array([[13, 14, 15, 16]]),
index=[0],
columns=['b', 'c', 'd', 'e'])
num = np.array([[s, s, s, datetime.strptime('2016-12-28', "%Y-%m-%d"), 'asdf', 24],
[s, s, s, datetime.strptime('2016-12-28', "%Y-%m-%d"), 'asdf', 6]])
columns = ['a', 'b', 'c', 'd', 'e', 'f']
idx = [x for x in xrange(0, len(num))]
return pd.DataFrame(num, index=idx, columns=columns)
c = [test_df().sort_values(['d', 'e', 'f']),
test_df().sort_values(['d', 'e', 'f'])]
df = pd.concat(c)
df = df[["e", "a"]].copy().reset_index(drop=True)
df["e_idx"] = df["e"]
what = [0, 0.5, 0.5, 1]

def x():
df.groupby(["e_idx", "e"])["a"].quantile(what)
self.assertRaisesRegexp(ValueError,
"'SeriesGroupBy' object has no attribute '_aggregate_item_by_item'",
x)

Problem description

The return message from the ValueError in _GroupBy._aggregate_item_by_item is vague.

except (AttributeError):
> raise ValueError
E ValueError

core/groupby.py:592: ValueError

The proposed change raises the error message for the user to see.

Expected Output

except (AttributeError) as e:
> raise ValueError(e)
E ValueError: 'SeriesGroupBy' object has no attribute '_aggregate_item_by_item'

core/groupby.py:592: ValueError

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: b895968
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None

pandas: 0.19.0+311.gb895968.dirty

nose: 1.3.7

pip: 9.0.1

setuptools: 32.3.1

Cython: 0.25.2

numpy: 1.11.3

scipy: 0.18.1

statsmodels: None

xarray: None

IPython: None

sphinx: None

patsy: None

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: None

s3fs: None

pandas_datareader: None

Issue 2:
In [19]: df = DataFrame({'a':['A1', 'A1', 'A1'], 'b':['B1','B1','B2'], 'c':1})

In [20]: df.set_index('a').groupby('b').rank(method='first')
Out[20]:
c
a
A1 1
A1 2
A1 1

In [21]: df.set_index('a').groupby('c').rank(method='first')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-21-6b8d4cae9d91> in <module>()
----> 1 df.set_index('a').groupby('c').rank(method='first')

/home/nicolas/Git/pandas/pandas/core/groupby.pyc in rank(self, axis, numeric_only, method, na_option, ascending, pct)

/home/nicolas/Git/pandas/pandas/core/groupby.pyc in wrapper(*args, **kwargs)
618 # mark this column as an error
619 try:
--> 620 return self._aggregate_item_by_item(name, *args, **kwargs)
621 except (AttributeError):
622 raise ValueError

/home/nicolas/Git/pandas/pandas/core/groupby.pyc in _aggregate_item_by_item(self, func, *args, **kwargs)
3076 # GH6337
3077 if not len(result_columns) and errors is not None:
-> 3078 raise errors
3079
3080 return DataFrame(result, columns=result_columns)

TypeError: rank() got an unexpected keyword argument 'numeric_only'

I'm trying to obtain what I would get with a row_number() in SQL...

Notice that if I replace the value in the 'c' column with the string '1', then even df.set_index('a').groupby('b').rank(method='first') fails.

Am I doing something wrong?