DOC: fix DataFrame.nlargest and DataFrame.nsmallest doctests
State: closed

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Based on #22459. Fix the docstring for `DataFrame.nlargest` and `DataFrame.nsmallest` (since they are quite similar). I also updated `ci/code_check.sh` I extended the existing doctest of `Series.nlargest` and `Series.nsmallest`.

Labels:
name: Docs

Comments:
Hello @Moisan! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/frame.py`](https://github.com/Moisan/pandas/blob/895e82d023faec8ee1ac8cd09690e62bdf5a2108/pandas/core/frame.py) !


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

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23202/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23202?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #23202      +/-   ##
==========================================
+ Coverage   92.18%   92.23%   +0.04%     
==========================================
  Files         161      161              
  Lines       51184    51197      +13     
==========================================
+ Hits        47185    47220      +35     
+ Misses       3999     3977      -22
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <ø> (-0.01%)` | :arrow_down: |
| #single | `42.27% <ø> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23202?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.03% <ø> (ø)` | :arrow_up: |
| [pandas/core/arrays/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YXMucHk=) | `93.75% <0%> (-0.56%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `86.64% <0%> (-0.2%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.46% <0%> (-0.16%)` | :arrow_down: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.22% <0%> (-0.15%)` | :arrow_down: |
| [pandas/core/computation/expr.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vZXhwci5weQ==) | `88.57% <0%> (-0.09%)` | :arrow_down: |
| [pandas/core/computation/scope.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vc2NvcGUucHk=) | `93.06% <0%> (-0.07%)` | :arrow_down: |
| [pandas/core/reshape/melt.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZWx0LnB5) | `97.32% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `96.41% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `98.01% <0%> (-0.01%)` | :arrow_down: |
| ... and [40 more](https://codecov.io/gh/pandas-dev/pandas/pull/23202/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23202?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/23202?src=pr&el=footer). Last update [a2e5994...4d30026](https://codecov.io/gh/pandas-dev/pandas/pull/23202?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

lgtm. @jschendel @datapythonista pls merge if ok with you.