From the course: Advanced Python: Practical Database Examples

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Connect to a DB using SQLAlchemy within Juypter Notebook

Connect to a DB using SQLAlchemy within Juypter Notebook - Python Tutorial

From the course: Advanced Python: Practical Database Examples

Connect to a DB using SQLAlchemy within Juypter Notebook

- [Instructor] While reading CSV data and manipulating it with Pandas is interesting. It would be even more interesting to integrate SQLAlchemy so we can access data from a live database. In our virtual environment, let's install a module that lets us connect to a database from our application. We'll be connecting to a SQLite database but you could connect to a different type of database as well. Let's install SQLAlchemy. Let's start up Jupyter Notebook. Our database is stored in a file called Salespeople SQLite and it's located in the exercise file, specifically in our Panda's workspace. This database has a single table called salespeople that lists different sales representatives working for the company. Let's use SQLAlchemy to connect to this database. We'll use Create Engine to connect to the database. Salespeople SQLite. While this is fine and dandy, we might want to make our application a little more dynamic.…

Contents