Skip to content
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

Implementing reverse sort #1167

Closed
denglert opened this issue Mar 1, 2017 · 4 comments
Closed

Implementing reverse sort #1167

denglert opened this issue Mar 1, 2017 · 4 comments
Assignees
Milestone

Comments

@denglert
Copy link

denglert commented Mar 1, 2017

While trying to reverse sort a hv.Points object I came across there is no reverse sort implemented in hv.
https://github.com/ioam/holoviews/blob/master/holoviews/core/data/__init__.py#L206

Would be nice to see something like:
hv.Points.sort('z', reverse=True)

@philippjfr
Copy link
Member

Thanks for filing this. It should be fairly straightforward since only columnar interfaces have to support this.

@jlstevens
Copy link
Contributor

Generalizing sort seems like a reasonable request - maybe in addition to reverse we could offer a comparison function to allow custom sorting?

@philippjfr
Copy link
Member

That should be straightforward enough for one column, not quite clear to me how that would work when you sort over multiple columns at once, but I think it makes sense.

@philippjfr philippjfr added this to the v1.7.0 milestone Mar 4, 2017
@philippjfr philippjfr self-assigned this Mar 4, 2017
@philippjfr philippjfr assigned jlstevens and unassigned philippjfr Mar 15, 2017
@philippjfr philippjfr modified the milestones: v2.0, v1.7.0 Mar 29, 2017
@philippjfr philippjfr modified the milestones: v1.9, v2.0 Aug 10, 2017
@philippjfr
Copy link
Member

philippjfr commented Sep 4, 2017

Going to close as reverse sort has been implemented and I think providing a sort function is out of scope, especially as I can't see how it would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants