Mirrors
pandas.DataFrame.flags — controls duplicate-label behaviour.
Every DataFrame and Series exposes a
flags getter returning a Flags object.
By default, allowsDuplicateLabels is true.
Mutate allowsDuplicateLabels directly on the
Flags object. The change is shared across all
Flags wrappers for the same underlying object.
Setting allowsDuplicateLabels = false on an object with
duplicate index labels immediately throws a
DuplicateLabelError.
Flags.copy() returns a new wrapper sharing the same state.
raiseOnDuplicates() validates only when
allowsDuplicateLabels is false.