How it works...

Strings passed to the query method are going to look more like plain English than normal pandas code. It is possible to reference Python variables using the at symbol (@) as with depts. All DataFrame column names are available in the query namespace by simply referencing their name without inner quotes. If a string is needed, such as Female, inner quotes will need to wrap it.

Another nice feature of the query syntax is the ability to write a double inequality in a single expression and its ability to understand the verbose logical operators and, or, and not instead of their bitwise equivalents as with boolean indexing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.204