pandas.api.typing.Expanding.sum

pandas 3.1.1 · Window operations · method

Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

Call syntax

pd.api.typing.Expanding.sum(numeric_only=False, engine=None, engine_kwargs=None)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
numeric_only Optional
Positional or keyword
Default False
bool

Restrict the calculation to columns pandas considers numeric where applicable.

engine Optional
Positional or keyword
Default None
str

Choose the implementation that performs the operation.

engine_kwargs Optional
Positional or keyword
Default None
dict

Pass a dictionary of options to the selected engine.

Returns

Series or DataFrame