DOC: fixes pipe example in basics.rst due to statsmodel changes
State: closed

To work around changes in statsmodel api.

- [ ] closes #19713
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Labels:
name: Docs

Comments:
can you also do the same change in ``whatsnew/v0.16.2`` and change the test

```
pandas) bash-3.2$ grep -r sm.poisson doc/
doc//source/whatsnew/v0.16.2.txt:   # sm.poisson takes (formula, data)
doc//source/whatsnew/v0.16.2.txt:      .pipe((sm.poisson, 'data'), 'hr ~ ln_h + year + g + C(lg)')
doc//source/basics.rst:For example, we can fit a regression using statsmodels. Their API expects a formula first and a ``DataFrame`` as the second argument, ``data``. We pass in the function, keyword pair ``(sm.poisson, 'data')`` to ``pipe``:
doc//source/basics.rst:      .pipe((sm.poisson, 'data'), 'hr ~ ln_h + year + g + C(lg)')
```
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19923?src=pr&el=h1) Report
> Merging [#19923](https://codecov.io/gh/pandas-dev/pandas/pull/19923?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/74dbfd0aa9b44936a4db7969bfe25f526fef53ce?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #19923   +/-   ##
=======================================
  Coverage   91.68%   91.68%           
=======================================
  Files         150      150           
  Lines       48976    48976           
=======================================
  Hits        44903    44903           
  Misses       4073     4073
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.06% <ø> (ø)` | :arrow_up: |
| #single | `41.85% <ø> (ø)` | :arrow_up: |


------

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

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

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

```diff
@@            Coverage Diff             @@
##           master   #19923      +/-   ##
==========================================
- Coverage   91.68%   91.66%   -0.02%     
==========================================
  Files         150      150              
  Lines       48976    48976              
==========================================
- Hits        44903    44896       -7     
- Misses       4073     4080       +7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.04% <ø> (-0.02%)` | :arrow_down: |
| #single | `41.86% <ø> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19923?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `96.83% <0%> (-0.5%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.5% <0%> (-0.11%)` | :arrow_down: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.17% <0%> (-0.04%)` | :arrow_down: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.31% <0%> (ø)` | :arrow_up: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.32% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/19923/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `94.65% <0%> (+1.3%)` | :arrow_up: |

------

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

Thanks @jreback I've made the requested changes to whatsnew/v0.16.2.
@ccatalfo Thanks a lot!