pandas.DataFrame.set_flags
pandas 3.1.1 · DataFrame · method
Get an object with changed flags, such as whether duplicate labels are allowed.
Call syntax
DataFrame.set_flags(*, copy=…, allows_duplicate_labels=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted 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