rank() throws TypeError: 'NoneType' object is not callable
#### Code Sample, a copy-pastable example if possible

```python
import numpy as np
import pandas as pd

groups = np.array(["A", "B"])
years = np.arange(2015, 2018)
values = np.arange(1,3)

table = np.array([years.repeat(len(groups)), np.tile(groups, len(years)), np.tile(values, len(years))]).T

table = pd.DataFrame(table, columns = ["year", "group", "val"])

table["year"] = table["year"].astype(int)
table["val"] = table["val"].astype(int)
table["group"] = table["group"].astype(str)

grp = table.groupby("year")

grp.rank()

```
#### Problem description

Running the rank method on the grouped table throws `TypeError: 'NoneType' object is not callable`

#### Expected Output

It should return ranked data for each year, or a descriptive error message.

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit           : None
python           : 3.6.9.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.15.0-70-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.3
numpy            : 1.17.4
pytz             : 2019.3
dateutil         : 2.8.1
pip              : 9.0.1
setuptools       : 39.0.1
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : 0.999999999
pymysql          : 0.9.3
psycopg2         : None
jinja2           : 2.10.3
IPython          : 7.10.2
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : None
matplotlib       : 3.1.2
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : None
sqlalchemy       : None
tables           : None
xarray           : None
xlrd             : None
xlwt             : None
xlsxwriter       : None
</details>
