Skip to content

Dataframe index has not to be unique #1

@feralfer

Description

@feralfer

Hie,
in your tuto you write "The index of a DataFrame is a set (i.e. each element is only represented once) that consists of a label for each row".
IMHO this is not true.
2 rows may have the same label
example :
data = [{'A': 'x', 'B': 'y', 'C':'z'}, {'A':'x', 'B': 'u', 'C': 'v'}]
df = pandas.DataFrame(data)
df.set_index(["A"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions