DataArray.sort_values() #5795
-
When going through https://github.com/raybellwaves/PyData-Portland-2021-talk/blob/main/talk.ipynb someone asked about the syntax of Adding will be helpful for pandas users but does duplicate an existing method/API |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I agree that
I'm not sure it's worth another method — as you point out — it duplicates another method, and could make it confusing on which to use. What are your thoughts @raybellwaves ? |
Beta Was this translation helpful? Give feedback.
I agree that
da_1d.sortby(da_1d)
could be simpler. Some options:da_1d.sortby()
could work for 1d arrays? Generally we try to not special-case by dimension number thoughda_1d.sortby(lambda x: x)
could be a nice general solution (it's already possible to pass lambdas to methods likewhere
), though maybe not that friendly to newcomers.I'm not sure it's worth another method — as you point out — it duplicates another method, and could make it confusing on which to use.
What are your thoughts @raybellwaves ?