Skip to content
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

DOC: Updating Series.autocorr docstring #22787

Merged

Conversation

HubertKl
Copy link
Contributor

  • closes #xxxx
  • tests added / passed
  • [ X ] passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@pep8speaks
Copy link

Hello @HubertKl! Thanks for submitting the PR.

float
The Pearson correlation between self and self.shift(lag).

See also
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the "A" in also need to be capitalized?

See also
--------
Series.corr : Compute the correlation between two Series.

Copy link
Contributor

Choose a reason for hiding this comment

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

Add Series.shift, DataFrame.corr and DataFrame.corrwith


Notes
-----
return Nan if the computation of the autocorr is not possible.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps say something like if the correlation is not defined. Nan should be written as

`NaN`


**Warning**

If the pearson correlation between self and self.shift(lag) cannot be
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than "self" and "self.shift(lag)", how about "If the Pearson correlation between the two points is not defined, then ``NaN`` is returned.

@codecov
Copy link

codecov bot commented Sep 21, 2018

Codecov Report

Merging #22787 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22787      +/-   ##
==========================================
+ Coverage   92.18%   92.18%   +<.01%     
==========================================
  Files         169      169              
  Lines       50810    50820      +10     
==========================================
+ Hits        46839    46850      +11     
+ Misses       3971     3970       -1
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 42.38% <ø> (+0.04%) ⬆️
Impacted Files Coverage Δ
pandas/core/series.py 93.74% <ø> (ø) ⬆️
pandas/util/testing.py 85.82% <0%> (-0.21%) ⬇️
pandas/core/frame.py 97.2% <0%> (ø) ⬆️
pandas/core/generic.py 96.67% <0%> (ø) ⬆️
pandas/core/indexes/datetimelike.py 98.1% <0%> (+0.01%) ⬆️
pandas/core/resample.py 96.97% <0%> (+0.18%) ⬆️
pandas/core/ops.py 97.37% <0%> (+0.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdb7a16...33dcb33. Read the comment docs.

@jreback jreback added this to the 0.24.0 milestone Sep 23, 2018
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Not sure if Pearson should be capitalized.

Also, I'd personally remove the "Warning" header in the examples, I think it gives more emphasis than needed.

But looks good to me. Good improvement. Thanks @HubertKl

@datapythonista datapythonista changed the title Docstring pandas series autocorr DOC: Updating Series.autocorr docstring Sep 23, 2018
@HubertKl
Copy link
Contributor Author

Thanks @TomAugspurger and @datapythonista for the constructive comments. I taken all of those into account in the last version.

@datapythonista
Copy link
Member

do you mind replacing pearson by Pearson in all the places it's written in the docstring?

@HubertKl
Copy link
Contributor Author

HubertKl commented Sep 23, 2018

Unless I made a mistake, I think that I replaced Pearson by pearson in the Third commit.

Edit: sorry I read it too quickly you suggested the other way arond, I got it. Sure!

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

lgtm, thank you @HubertKl for the changes! Will merge on green.

@TomAugspurger TomAugspurger merged commit f64f994 into pandas-dev:master Sep 26, 2018
@TomAugspurger
Copy link
Contributor

Thanks @HubertKl!

Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
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.

6 participants