pandas.Series.any

pandas 3.1.1 · Series and accessors · method

Test whether at least one value along the selected axis or group evaluates to true.

Call syntax

Series.any(*, axis=0, bool_only=False, skipna=True, **kwargs)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
axis Optional
Keyword only
Default 0
{0 or 'index', 1 or 'columns', None}

Choose which axis the operation acts on. The accepted axis labels depend on the receiver.

bool_only Optional
Keyword only
Default False
bool

Restrict eligible inputs to boolean data.

skipna Optional
Keyword only
Default True
bool

Choose whether to exclude missing values during the calculation.

**kwargs Optional
Additional keyword arguments

Returns

Series or scalar