Reputation: 248
I have the following code:
df(df.Sex=='male')
I get an error stating that the DataFrame object is not callable.
How can I solve this?
Upvotes: 0
Views: 24899
Reputation: 862431
It is called boolean indexing
and need []
only:
df[df.Sex=='male']
Or:
df.query("Sex =='male'")
Upvotes: 13