-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API for splitting pandas objects #4059
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
Comments
related #3066 |
groupby in the backend?
|
In retrospect, #3066 actually points out two missing operations from the API: >>> [1 1 2 2 11].groupby( identity)
[(1,1,1,1) (2,2)]
>>> [1 1 2 2 11].partition(identity)
[(1,1) (2,2) (1,1)]
>>> [1 1 2 2 11].split_by(is_2)
[(1 1 2) (2) (1 1)] partition and split_by can be thought of as the same operation with edge Should probably return a groupby-like object, rather then a collection of frames directly Update:
|
Another example where y-p's |
I think the groupby idiom can be usefull generalized to support different types of One kink is that In general, group keys may not be distinct ( result keys may look like [1 2 1]). The different kinds of split/partition/group semantics possible, such as Allowing overlapping groups is another twist. Should trim fluff features before attempting implementation. |
closing as there's been no activity in about a decade, if there's a need for this feature I presume someone will comment / open a new issue (though at this point, in 2023, I doubt it would be accepted) |
http://stackoverflow.com/questions/17315737/split-a-large-pandas-dataframe
related #414
The text was updated successfully, but these errors were encountered: