groupby apply
When the returned dataframe(or series) have the same length of the original dataframe. The index for grouped keys are missing. For example:
a = pd.DataFrame({'l':['a','a','b','b','c'],'x':[1,2,3,4,5]})
a.groupby('l')['x'].apply(lambda r: r)

output:
0    1
1    2
2    3
3    4
4    5

Notice the key 'l' is missing in the output.

This cause some problem if one is not sure whether the returned dataframe or sereires will have the same length.

Best regards



#### A small, complete example of the issue

```python
# Your code here

```

#### Expected Output

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

<details>
# Paste the output here pd.show_versions() here

</details>
