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

ARROW-12911: [Python] Export scalar aggregate options to pc.sum #10433

Closed
wants to merge 4 commits into from

Conversation

cyb70289
Copy link
Contributor

@cyb70289 cyb70289 commented Jun 2, 2021

No description provided.

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks, looks good.

There is a sum method on the Array object as well. Maybe we can pass through keyword arguments there as well?

@@ -836,12 +836,6 @@ cdef class Array(_PandasConvertible):
result = GetResultValue(self.ap.View(type.sp_type))
return pyarrow_wrap_array(result)

def sum(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this sum?

Copy link
Member

Choose a reason for hiding this comment

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

Actually removing this method is a backwards incompatible change. If we want to do that, I think we should deprecate it first (although it is certainly strange to only have a single reduction method exposed here)

For now I would maybe just pass through **kwargs (or leave as as)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added kwargs to array.sum(). Tested array.sum(min_count=0).

@cyb70289 cyb70289 marked this pull request as draft June 2, 2021 10:19
@cyb70289 cyb70289 marked this pull request as ready for review June 3, 2021 02:36
@jorisvandenbossche
Copy link
Member

Thanks!

@cyb70289 cyb70289 deleted the 12911-py-sum branch June 4, 2021 10:16
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
Closes apache#10433 from cyb70289/12911-py-sum

Authored-by: Yibo Cai <yibo.cai@arm.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants