pandas.Series.set_flags

pandas 3.1.1 · Series and accessors · method

Get an object with changed flags, such as whether duplicate labels are allowed.

Call syntax

Series.set_flags(*, copy=…, allows_duplicate_labels=None)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
copy Optional
Keyword only
bool

Control whether data is copied where the API supports that choice.

allows_duplicate_labels Optional
Keyword only
Default None
bool

Returns

Series or DataFrame