MCPcopy
hub / github.com/pydata/xarray / to_index

Method to_index

xarray/core/variable.py:580–582  ·  view source on GitHub ↗

Convert this variable to a pandas.Index

(self)

Source from the content-addressed store, hash-verified

578 return self.to_index_variable()._to_index()
579
580 def to_index(self) -> pd.Index:
581 """Convert this variable to a pandas.Index"""
582 return self.to_index_variable().to_index()
583
584 def to_dict(
585 self, data: bool | Literal["list", "array"] = "list", encoding: bool = False

Callers 15

get_clean_interp_indexFunction · 0.95
group_as_indexMethod · 0.45
__init__Method · 0.45
_to_dataframeMethod · 0.45
_localizeFunction · 0.45
_index_or_dataFunction · 0.45
test_modify_inplaceMethod · 0.45
test_reindexMethod · 0.45
test_set_indexMethod · 0.45
test_reset_indexMethod · 0.45

Calls 1

to_index_variableMethod · 0.95

Tested by 15

test_modify_inplaceMethod · 0.36
test_reindexMethod · 0.36
test_set_indexMethod · 0.36
test_reset_indexMethod · 0.36
test_reorder_levelsMethod · 0.36
test_propertiesMethod · 0.36
test_coords_to_indexMethod · 0.36