Sorting tables elements that are not fully strings, floats or ints
Hi. I'm looking to sort tables that contain values which are numeric, but to help the user, I want to add a colorbar in the cell. Because I do that the elements can no longer be sorted. Is there a workaround to allow the cells to be sorted still? I would rather that, than placing colorbar in a separate column. This goes for any type of composite type of cell really. It would be great if you could still sort (given some condition that is sortable).
Solution:Jump to solution
Not currently. I would suggest another column.
You could try:
1. Custom
format_mapping
. Keep the value the same, but add the color in the format function:
```python...1 Reply
Solution
Not currently. I would suggest another column.
You could try:
1. Custom
format_mapping
. Keep the value the same, but add the color in the format function:
2. Custom ordering on the object itself. see https://www.geeksforgeeks.org/sorting-objects-of-user-defined-class-in-python/