-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Feature request
It would be really nice if we would have a simple and performant way to sort values inside nested frames. I think that we can reimplement sort_values allowing subcolumns with dot-notation. To not confuse user I'd allow single nested column per call.
Allow:
ndf.sort_values("a")ndf.sort_values(["a", "b"])ndf.sort_values("lc.time")ndf.sort_values(["lc.band", "lc.time"])
Do not allow:
ndf.sort_values(["a", "lc.time"])ndf.sort_values(["detections.time", "non_detections.band"])
The implementation would be something like this:
flat = ndf.lc.nest.to_flat()
flat = flat.sort_values([flat.index.name] + sort_subcolumns)
ndf.lc[:] = flatBefore submitting
Please check the following:
- I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
- I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
- If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request