turicreate.SArray.cumulative_min

SArray.cumulative_min()

Return the cumulative minimum value of the elements in the SArray.

Returns an SArray where each element in the output corresponds to the minimum value of all the elements preceding and including it. The SArray is expected to be of numeric type (int, float).

Returns:
out : SArray[int, float]

Notes

  • Missing values are ignored while performing the cumulative aggregate operation.

Examples

>>> sa = SArray([1, 2, 3, 4, 0])
>>> sa.cumulative_min()
dtype: int
rows: 3
[1, 1, 1, 1, 0]