-
-
Notifications
You must be signed in to change notification settings - Fork 153
feat(array): #624 accumulate #1400
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
feat(array): #624 accumulate #1400
Conversation
79a77ac to
309fdf4
Compare
loicdiridollou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/series/test_properties.py
Outdated
| assert_type( | ||
| pd.Series([1], dtype="category").array, | ||
| pd.Categorical, | ||
| cast("Series[Int64Dtype]", Series([1, NA], dtype="Int64")).array, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not have a test like this for 2 reasons:
- It encourages the use of
Series[Int64Dtype]and I just don't think we would introduce that. Also, thenInt64Dtypeshould really be inS1 - We can have a test with
dtype="Int64", but then the results will just be anExtensionArrayfor now, and if someone wants the real type, they can cast the result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def __get__( | ||
| self, instance: IndexOpsMixin[Int64Dtype], owner: type[IndexOpsMixin] | ||
| ) -> IntegerArray: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should exist because Int64Dtype is in S1, and I don't want to introduce that now, because it will open up a whole set of new issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to create a new type for that. The extension array stuff isn't widely used. |
Dr-Irv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @cmp0xff
cmp0xff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Series[Int64Dtype] removed
tests/series/test_properties.py
Outdated
| assert_type( | ||
| pd.Series([1], dtype="category").array, | ||
| pd.Categorical, | ||
| cast("Series[Int64Dtype]", Series([1, NA], dtype="Int64")).array, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def __get__( | ||
| self, instance: IndexOpsMixin[Int64Dtype], owner: type[IndexOpsMixin] | ||
| ) -> IntegerArray: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added cumsum, cumprod, cummin and cummax to the ExtensionArray interface via _accumulate(partially resolving it)