- Before we can begin reading tables from the chinook database, we need to set up our SQLAlchemy engine:
>>> from sqlalchemy import create_engine>>> engine = create_engine('sqlite:///data/chinook.db')
- We can now step back into the world of pandas and remain there for the rest of the recipe. Let's complete a simple command and read in the tracks table with the read_sql_table function. The name of the table is the first argument and the SQLAlchemy engine is the second:
>>> tracks = pd.read_sql_table('tracks', engine)>>> tracks.head()>>> genres = pd.read_sql_table('genres', engine)
- For the rest of the recipe, we will answer ...