index disappears on groupby.rank()
df = pd.DataFrame({'A' : [1, 1, 3, 4], 'B': [7, 7, 7, 8], 'C': [5, 6, 7, 8], 'D': [5, 6, 7, 8]})
print(df)
print("")
print(df.groupby(["A", "B"]).rank())
print("")
print(df.groupby(["A", "B"]).sum())
print("")
print(df.groupby(["A", "B"]).count())
print("")
#### Expected Output

Would expect all three functions to show similar output. Sum and count work as expected but rank does not show A/B.
#### output of `pd.show_versions()`

   A  B  C  D
0  1  7  5  5
1  1  7  6  6
2  3  7  7  7
3  4  8  8  8

```
 C    D
```

0  1.0  1.0
1  2.0  2.0
2  1.0  1.0
3  1.0  1.0

```
  C   D
```

A B  
1 7  11  11
3 7   7   7
4 8   8   8

```
 C  D
```

A B  
1 7  2  2
3 7  1  1
4 8  1  1
