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

Method get_loc

xarray/coding/cftimeindex.py:411–416  ·  view source on GitHub ↗

Adapted from pandas.tseries.index.DatetimeIndex.get_loc

(self, key)

Source from the content-addressed store, hash-verified

409 return indexer
410
411 def get_loc(self, key):
412 """Adapted from pandas.tseries.index.DatetimeIndex.get_loc"""
413 if isinstance(key, str):
414 return self._get_string_slice(key)
415 else:
416 return super().get_loc(key)
417
418 def _maybe_cast_slice_bound(self, label, side):
419 """Adapted from

Callers 6

get_valueMethod · 0.95
__contains__Method · 0.95
selMethod · 0.80
selMethod · 0.80
test_get_locFunction · 0.80
test_multiindexFunction · 0.80

Calls 1

_get_string_sliceMethod · 0.95

Tested by 2

test_get_locFunction · 0.64
test_multiindexFunction · 0.64