Skip to content

Pandas error KeyError: 'gender'  #7

@jairajsahgal

Description

@jairajsahgal

Apparently in lines
#Step by step approad, the one-liners can be found below their respective tables
df=df[df["gender"]=="M"]
df=df[["name","count"]]
df=df.groupby("name")
df=df.sum()
df=df.sort_values("count",ascending=False)
df.head(10)
Error is coming after running it second time.
Also, the one-liner is also not running.
This is the first time I have raised issue in Github

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions