5

I just seccessfully did the following query:

df2.query('Neighborhood == "Not assigned"')

The result was the rows witch the value for the column "Neighborhood" was "Not assigned". (in my case zero)

I'm tryind to do this query now:

df2.query('Postal Code == "M5A"')

But I'm getting invalid syntax.

2 Answers 2

11

Adding

df2.query('`Postal Code` == "M5A"')
Sign up to request clarification or add additional context in comments.

2 Comments

Solved! But where is ` on the keyboard
@bakun left to number 1 ~
6

Try using backticks:

df2.query('`Postal Code` == "M5A"')

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.