0

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?

1 Answer 1

13

It is called boolean indexing and need [] only:

df[df.Sex=='male']

Or:

df.query("Sex =='male'")
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.