Implement get group#19924
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
I checked the failing For this PR, the fragment should be renamed to: I also noticed there are separate red statuses from CircleCI and ReadTheDocs on the PR, so this only addresses the towncrier/changelog failure. |
Oh thank you! Getting it done |
|
@Omiii-215 - thanks! This is on the right track. I have a couple of design suggestions. First is to eliminate the option of supplying a dict for the key. This does not match pandas nor the similar concept of a key in table indexing (e.g. Second, putting everything in a single method in the |
|
Also, please rebase on main. In astropy we do not merge main into a feature branch. For most short-lived PRs you won't need to rebase unless a merge conflict appears. |
|
@Omiii-215 - I pushed a couple of small commits. The one last thing this will need is an example in the narrative docs. In the |
aec140a to
eb86ed1
Compare
|
@taldcroft
Note on failing CI: The |
|
Please rebase. |
eb86ed1 to
5ecfcbf
Compare
Description
This pull request is to address the inability to select a table group by its key instead of its numerical index. It introduces a new
get_group(key)method toBaseGroups(which inherits toTableGroupsandColumnGroups), allowing users to easily look up groups using scalar values, tuples, or dictionaries, effectively mirroring the behavior ofpandas'sget_group.Fixes #3773