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

Implement reductions from #24024 #24484

Merged
merged 6 commits into from
Dec 29, 2018
Merged

Conversation

jbrockmendel
Copy link
Member

min/max signatures+docstrings are changed from #24024, instead match those of DatetimeIndexOpsMixin (with appropriate docstring edits)

The min/max implementations are unchanged from 24024. In an upcoming pass I'll see if we can pawn any more of it off to nanops.

Tests are verbatim from 24024.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

maybe out th treats in the new pandas/tests/reductions

Index.max : Return the maximum value in an Index.
Series.max : Return the maximum value in a Series.
"""
# TODO: skipna is broken with max.
Copy link
Contributor

Choose a reason for hiding this comment

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

this was just fixed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought so too, but no. I expect it won't be too tough to fix nanops to apply the DTI fix to DTA, will do so in an upcoming pass after the 24024-specific parts are de-duplicated


class TestReductions(object):

@pytest.mark.parametrize("tz", [None, "US/Central"])
Copy link
Contributor

Choose a reason for hiding this comment

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

in test_reductions?

Copy link
Member Author

Choose a reason for hiding this comment

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

before long, yah. For now i want to make rebasing 24024 easy on tom

@jreback jreback added Datetime Datetime data dtype API Design labels Dec 29, 2018
@jreback jreback added this to the 0.24.0 milestone Dec 29, 2018
@jreback
Copy link
Contributor

jreback commented Dec 29, 2018

ping on green.

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #24484 into master will increase coverage by <.01%.
The diff coverage is 96.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24484      +/-   ##
==========================================
+ Coverage    92.3%   92.31%   +<.01%     
==========================================
  Files         166      166              
  Lines       52386    52412      +26     
==========================================
+ Hits        48357    48382      +25     
- Misses       4029     4030       +1
Flag Coverage Δ
#multiple 90.73% <96.15%> (ø) ⬆️
#single 43.05% <15.38%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/datetimelike.py 95.5% <96.15%> (+0.03%) ⬆️

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 41b2b18...bf99607. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #24484 into master will decrease coverage by 49.27%.
The diff coverage is 15.38%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #24484       +/-   ##
===========================================
- Coverage   92.31%   43.03%   -49.28%     
===========================================
  Files         166      166               
  Lines       52335    52361       +26     
===========================================
- Hits        48313    22535    -25778     
- Misses       4022    29826    +25804
Flag Coverage Δ
#multiple ?
#single 43.03% <15.38%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/datetimelike.py 44.6% <15.38%> (-51.06%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-98.65%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-95.46%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.17%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.15%) ⬇️
... and 125 more

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 aeff38d...244d37b. Read the comment docs.

@jbrockmendel
Copy link
Member Author

this will need rebase following #24476.

@jbrockmendel
Copy link
Member Author

Ping


def min(self, axis=None, skipna=True, *args, **kwargs):
"""
Return the minimum value of the Array or minimum along
Copy link
Contributor

Choose a reason for hiding this comment

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

are these meant in inherit docstrings? these should have Parameters if not

Copy link
Member Author

Choose a reason for hiding this comment

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

these are copied from the DatetimeIndexOps versions, with "Index" changes to "Array" and Index.min/Index.max added to the See Also sections. These will be templated/shared before long hopefully

Copy link
Contributor

Choose a reason for hiding this comment

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

ok can u make a follow up issue for this

@jreback jreback merged commit 02a97c0 into pandas-dev:master Dec 29, 2018
@jbrockmendel jbrockmendel deleted the eared branch December 29, 2018 22:10
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
* upstream/master:
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
* upstream/master:
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
…strings

* upstream/master:
  TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492)
  Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502)
  DOC: Fix building of a single API document (pandas-dev#24506)
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants