import dascore as dc
trough_time = dc.get_example_patch().idxmin("time")idxmin
idxmin(
patch: Patch ,
dim: str ,
dim_reduce: str | collections.abc.Callable[str, Callable] = empty,
)-> ‘PatchType’
Return the coordinate value where the data are smallest along a dimension.
Parameters
| Parameter | Description |
|---|---|
| patch | The input Patch. |
| dim |
The name of the single dimension to reduce. None or a sequence, which the other aggregations accept, raises here. |
| dim_reduce |
How to reduce the dimensional coordinate associated with the aggregated axis. Can be the name of any valid aggregator, a callable, “empty” (the default) which returns a length 1 partial coord, or “squeeze” which drops the coordinate. For dimensions with datetime or timedelta datatypes, if the operation fails it will automatically be applied to the coordinates converted to floats then the output converted back to the appropriate time type. |
Note
The data become coordinate values rather than the values found there, so they take the coordinate’s dtype. Use
Patch.maxorPatch.minfor the values themselves.NaN and NaT samples are skipped. A slice with none left has no coordinate to point at, so it yields a null; an integer coordinate is widened to float64 to hold one, which loses exactness above 2**53, and a coordinate which can hold no null, such as a string one, raises.
Ties go to the first occurrence, as in NumPy.