Skip to content

DOC: fixes pipe example in basics.rst due to statsmodel changes #19923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DOC GH19713 Also update whatsnew with poisson to ols change in statsm…
…odel pipe example.
  • Loading branch information
ccatalfo committed Feb 28, 2018
commit 5ffcc22a537967989d1c13451df62d78e38bb19e
4 changes: 2 additions & 2 deletions doc/source/whatsnew/v0.16.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ of ``(function, keyword)`` indicating where the DataFrame should flow. For examp

bb = pd.read_csv('data/baseball.csv', index_col='id')

# sm.poisson takes (formula, data)
# sm.ols takes (formula, data)
(bb.query('h > 0')
.assign(ln_h = lambda df: np.log(df.h))
.pipe((sm.poisson, 'data'), 'hr ~ ln_h + year + g + C(lg)')
.pipe((sm.ols, 'data'), 'hr ~ ln_h + year + g + C(lg)')
.fit()
.summary()
)
Expand Down