Skip to content

DOC: Add Notes about difference to numpy behaviour for ddof in std() GH35985 #35986

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

Conversation

timhunderwood
Copy link
Contributor

@timhunderwood timhunderwood commented Aug 30, 2020

Copy link
Member

@dsaxton dsaxton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timhunderwood, small suggested wording edit

@dsaxton dsaxton added the Docs label Aug 30, 2020
wording change.

Co-authored-by: Daniel Saxton <[email protected]>
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timhunderwood

normalizes by N

Are you sure this is correct? Does dividing by N actually normalise the quantity?

IMO it should be enough to write something like

Notes
-----
To have the same behaviour as `numpy.std`, use `ddof=0` (instead of the default `ddof=1`)

@timhunderwood
Copy link
Contributor Author

Thanks @timhunderwood

normalizes by N

Are you sure this is correct? Does dividing by N actually normalise the quantity?

IMO it should be enough to write something like

Notes
-----
To have the same behaviour as `numpy.std`, use `ddof=0` (instead of the default `ddof=1`)

Thanks @timhunderwood

normalizes by N

Are you sure this is correct? Does dividing by N actually normalise the quantity?

IMO it should be enough to write something like

Notes
-----
To have the same behaviour as `numpy.std`, use `ddof=0` (instead of the default `ddof=1`)

thanks @MarcoGorelli , I agree this could be confusing. I've changed to your simpler wording, thanks.

Copy link
Member

@dsaxton dsaxton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like an improvement to me 👍

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, can you fetch and merge upstream/master and then push again to restart the CI process in order to get it green?

@timhunderwood
Copy link
Contributor Author

Looks good to me, can you fetch and merge upstream/master and then push again to restart the CI process in order to get it green?

Done - CI process has started...

@MarcoGorelli MarcoGorelli merged commit 497ede8 into pandas-dev:master Sep 3, 2020
@MarcoGorelli
Copy link
Member

Thanks @timhunderwood !

kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
…GH35985 (pandas-dev#35986)

* DOC: Add Notes about difference to numpy behaviour for ddof.

GH35985.

* remove trailing whitespace.

* Update pandas/core/generic.py

wording change.

Co-authored-by: Daniel Saxton <[email protected]>

* Make wording simpler and remove reference to normalization.

* Make wording simpler and remove reference to normalization.

Co-authored-by: Daniel Saxton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: make difference between numpy behaviour clearer in Dataframe.std() and Series.std()
3 participants