import dascore as dc
= dc.get_example_spool()
spool # sort spool based on values in time coordinate.
= spool.sort("time")
spool_time_sorted # sort spool based on values in tag
= spool.sort("tag") spool_tag_sorted
sort
sort(
self ,
attribute ,
)-> ‘Self’
Sort the Spool based on a specific attribute.
Parameters
Parameter | Description |
---|---|
attribute |
The attribute or coordinate used for sorting. If a coordinate name is used, the sorting will be based on the minimum value. |