Chapter 23

Databases with Python and pandas

Learning Objectives

Upon completing all the content in this chapter, you should be able to do the following:

  1. Establish a connection to a sqlite3 database using python.
  2. Create a cursor object to interact with the database.
  3. Create a pandas DataFrame using data from a sqlite3 database.
  4. Add data from a pandas DataFrame into a sqlite3 database.

Key Terminology

Databases with Python

  1. sqlite3
  2. Cursor object
  3. parameterized queries