Skip to content

ENH: support min/max/sum for pyarrow duration dtypes #50928

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
Jan 26, 2023

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@jbrockmendel jbrockmendel added the Arrow pyarrow functionality label Jan 21, 2023
@jbrockmendel jbrockmendel force-pushed the tst-pa-duration-reduce branch from 04e0dcb to 471b777 Compare January 23, 2023 19:07
@@ -1032,6 +1032,9 @@ def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
not_eq = pc.not_equal(data_to_cmp, 0)
data_to_reduce = not_eq

elif name in ["min", "max", "sum"] and pa.types.is_duration(pa_type):
Copy link
Member

Choose a reason for hiding this comment

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

Could you open up a pyarrow issue to see if they would support min/max/sum for duration types in the future?

@mroeschke mroeschke added this to the 2.0 milestone Jan 26, 2023
@mroeschke mroeschke merged commit fdba1e6 into pandas-dev:main Jan 26, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants