xdas.coordinates.SampledCoordinate.get_indexer#
- SampledCoordinate.get_indexer(value, method=None)[source]#
Return the integer index for label value using the segment structure.
- Parameters:
value (scalar, str (ISO datetime), or array-like) – Label(s) to locate.
method ({None, "nearest", "ffill", "bfill"}, optional) – How to handle values that fall in gaps or between samples.
- Return type:
int or numpy.ndarray
- Raises:
KeyError – If value falls in an overlap region or is not found (exact mode).