-
Notifications
You must be signed in to change notification settings - Fork 370
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
Index GroupedDataFrame with array of keys #2046
Conversation
138b64d
to
84dc1a7
Compare
Resolved issues and added support for |
Looks good apart from the comment I left (and maybe @nalimilan will want to add something 😄) |
Also please make sure you test:
Thank you. |
I have thought over your proposal and I think we need to be more strict in a way we introduce allowed indexing. I will leave the comments in relevant methods. |
Before we go any further with this - I went a little further than your request to group all the indexing code together and just split |
Let us wait for @nalimilan to comment on #2050 then. |
4039ee4
to
6bb79b8
Compare
Updates:
Issues not addressed:
|
6bb79b8
to
64dccb3
Compare
Thank you for the update.
It is valid in DataFrames.jl:
and also for normal vectors:
I will have a look at your code to check.
Yes - this is how it should work |
It also seems from your implementation that you do not support I would rather delegate Also - as I have commended earlier - I would recommend you to use |
You're right about |
For everything involving |
I think the main reason is that this decision is very committing so as long as it can be postponed we try not to do it. The major issue is that Julia does not allow multiple inheritance currently. |
64dccb3
to
279b1c1
Compare
|
Looks good. Thank you. I just left one comment (with a request for an additional test). |
Remaining issues should be resolved. |
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.
Looks good. Hopefully we have caught all corner cases 😄.
@nalimilan - can you please merge it when you are fine with this PR. Thank you!
@nalimilan - please have a look at it when you have time so that we can merge it if it is OK. |
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.
Sorry for the delay, I hadn't noticed this was ready to review. Looks mostly good!
Resolved rest of @nalimilan's suggestions. |
Looks good. I just left one minimal comment (we should either narrow the condition there or special case when @nalimilan - apart from this I would merge this. Thank you! |
Thanks @jlumpe! |
Use array of keys (
GroupKey
/Tuple
/NamedTuple
) ingetindex(::GroupedDataFrame, ...)
.I also fixed a couple of issues remaining in my last PR: a test for
IndexStyle(::GroupKeys)
and added some missing bindings to the documentation.