From the course: Faster pandas

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Optimizing with SQL

Optimizing with SQL

From the course: Faster pandas

Start my 1-month free trial

Optimizing with SQL

- [Instructor] SQL is the language you use to query relational databases. It practically invented the notion of schema, and have a wide variety of types. SQL allows you to select only part of the data in a very efficient way. It's a common practice in companies that have a lot of data to first use SQL to reduce the data and run some aggregations, and then do the final processing with pandas in memory. SQLite is a built-in Python module which provides an embedded SQL. SQLite is one of the most popular databases out there, with billions of users. If you're running a web browser or have an Android phone, you're using SQLite. I've used SQLite in several projects. You can push a lot of data quickly to a database and copy it over. It's just a single file. Let's have a look at bikes.db. So ipython, and we're going to import sqlite3, and then we're going to connect, so conn equal sqlite3.connect to bikes.db. And now we're going to query the metadata table to see what tables are there. So…

Contents