Closed
Description
edit: see #27108 (comment)
I'd like to be able to have an index, and ensure that no operation introduces duplicates.
idx = pd.Index(..., allow_duplicates=False)
s = pd.Series(..., index=idx)
From here, any pandas operation that introduces duplicates (e.g. s.loc[['a', 'a']]
) would raise, rather than return an Index with two values.