-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Pandas 1.x Cookbook
By :

Many pandas users will have experience of interacting with a database using Structured Query Language (SQL). SQL is a standard to define, manipulate, and control data stored in a database
SQL is an important language for data scientists to know. Much of the world's data is stored in databases that require SQL to retrieve and manipulate it SQL syntax is fairly simple and easy to learn. There are many different SQL implementations from companies such as Oracle, Microsoft, IBM, and more.
Within a SQL SELECT
statement, the WHERE
clause is very common and filters data. This recipe will write pandas code that is equivalent to a SQL query that selects a certain subset of the employee dataset.
Suppose we are given a task to find all the female employees who work in the police or fire departments who have a base salary of between 80 and 120 thousand dollars.
The following SQL statement would answer this query for us:
SELECT
UNIQUE_ID...