Unfortunately, the SQLite database that we use does not support all of the join options (right and outer), so I will provide only two examples of a join (left and inner) using SQL in this walk-through. The good news is that the pandas library supports all join types using the merge() function, so we can recreate all of the examples already discussed. Feel free to walk through the following code; I have placed a copy of the Jupyter Notebook code on GitHub for reference.
We will begin by launching a new Jupyter notebook and naming it ch_08_exercises:
- Load a SQLite database connection:
In[]: import sqlite3
This library should already be available using Anaconda. Refer to Chapter 2, Overview of Python and Installing Jupyter Notebook, for help with setting up your environment.
...