Open
Description
What is your issue?
At the moment, the Coordinates
objects are not as useful as I'd like them to be, so in this issue I'd like to collect all the methods it should support. Some of these already exist, but listing them again helps with defining a coherent API:
- coordinate variables
- assignment of new coordinates (from
Variable
/DataArray
/Coordinates
/ any array):Coordinates.assign()
- deletion of coordinates (similar to
Dataset.drop_vars
): only viadel coords["x"]
but aCoordinates.drop_vars()
might be welcome I guess - renaming coordinates: no specific method yet,
Coordinates.rename_vars()
? - renaming dimensions on coordinates: no specific method yet,
Coordinates.rename_dims()
?
- assignment of new coordinates (from
- indexes
- assignment of index instances: could use
Coordinates.assign(Coordinates.from_xindex(idx_obj))
but one index at a time - dropping indexes:
Coordinates.drop_indexes()
(Add Coordinatesset_xindex()
anddrop_indexes()
methods #8118) - creation of an index based on variables, a given class, and additional options:
Coordinates.set_xindex()
(Add Coordinatesset_xindex()
anddrop_indexes()
methods #8118)
- assignment of index instances: could use
- combination
- merging (also using
|
)
- merging (also using