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

Add some cumulative Column operations #193

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

MarcoGorelli
Copy link
Contributor

I noticed plotly uses some cumulative functions (Series.cumsum) - OK to start adding some simple and common cumulative operations to Column?

@jorisvandenbossche
Copy link
Member

If we add them, we might want to use the full name (cumulative_...), xref data-apis/array-api#597 (comment)

@kgryte
Copy link
Contributor

kgryte commented Jul 4, 2023

These APIs are likely to be added to the 2023 revision of the array API standard. May be preferable to either wait until the naming convention is sorted there, or help participate in that discussion. Apart from cumulative_sum, another alternative is cusum.

@MarcoGorelli
Copy link
Contributor Author

have updated, thanks

let's go with cumulative_, and we can always update later again if necessary?

@rgommers
Copy link
Member

rgommers commented Jul 5, 2023

let's go with cumulative_, and we can always update later again if necessary?

That sounds fine to me - keeps the ball rolling.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

This seems fine to me, thanks Marco. Assuming folks want the min/max too; they seem commonly implemented in dataframe libraries at least.

And checking: typing is going to need Column[Any] perhaps, given the other typing PR?

@MarcoGorelli
Copy link
Contributor Author

for sum and prod, yes

for cumulative_min and cumulative_max, I think we could be more precise: Column[DType] (it should be preserved for these two operations, right?)

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.

4 participants