pandas.api.extensions.ExtensionArray._accumulate#
- ExtensionArray._accumulate(name, *, skipna=True, **kwargs)[source]#
Return an ExtensionArray performing an accumulation operation.
The underlying data type might change.
- Parameters:
- namestr
Name of the function, supported values are: - cummin - cummax - cumsum - cumprod
- skipnabool, default True
If True, skip NA values.
- **kwargs
Additional keyword arguments passed to the accumulation function. Currently, there is no supported kwarg.
- Returns:
- array
An array performing the accumulation operation.
- Raises:
- NotImplementedErrorsubclass does not define accumulations
See also
api.extensions.ExtensionArray._concat_same_type
Concatenate multiple array of this dtype.
api.extensions.ExtensionArray.view
Return a view on the array.
api.extensions.ExtensionArray._explode
Transform each element of list-like to a row.
Examples
>>> arr = pd.array([1, 2, 3]) >>> arr._accumulate(name="cumsum") <IntegerArray> [1, 3, 6] Length: 3, dtype: Int64