Skip to main content
`Ctrl`+`K`

# pandas.api.extensions.ExtensionArray._accumulate

ExtensionArray._accumulate(name, *, skipna=True, **kwargs)

  Return an ExtensionArray performing an accumulation operation.

  The underlying data type might change.

  Parameters:
    name str

      Name of the function, supported values are: - cummin - cummax - cumsum - cumprod

    skipna bool, 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:
    NotImplementedError subclass 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