DOC: adapt example of groupby filter and transform
State: closed

In this pull request the `filter` and `transform` examples are converted to a running doctest


Labels:
name: Docs
name: Groupby

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15624?src=pr&el=h1) Report
> Merging [#15624](https://codecov.io/gh/pandas-dev/pandas/pull/15624?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1?src=pr&el=desc) will **decrease** coverage by `-0.02%`.
> The diff coverage is `n/a`.


```diff
@@            Coverage Diff             @@
##           master   #15624      +/-   ##
==========================================
- Coverage   91.01%      91%   -0.02%     
==========================================
  Files         143      143              
  Lines       49301    49301              
==========================================
- Hits        44873    44864       -9     
- Misses       4428     4437       +9
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15624?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `94.98% <ø> (ø)` | :white_check_mark: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `91.76% <0%> (-0.35%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.87% <0%> (-0.1%)` | :x: |
| [pandas/tseries/index.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvaW5kZXgucHk=) | `95.39% <0%> (+0.09%)` | :white_check_mark: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.3% <0%> (+0.33%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15624?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15624?src=pr&el=footer). Last update [54e71a7...ee90944](https://codecov.io/gh/pandas-dev/pandas/compare/54e71a74c81ecefb55bb35934b75f4cd1fb3ded1...ee9094431562945b427985b63352f2de0002e3bd?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
thanks!