From the course: Advanced Python: Practical Database Examples

Unlock the full course today

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

Visualize data using SQLAlchemy, pandas, and Matplotlib

Visualize data using SQLAlchemy, pandas, and Matplotlib - Python Tutorial

From the course: Advanced Python: Practical Database Examples

Visualize data using SQLAlchemy, pandas, and Matplotlib

- [Instructor] In order to use data in our application, we'll need to import it. In fact, we can load the data directly into a Pandas data frame making it really easy to work with. We can use the read SQL table method to load a table from the database. The table is called salespeople and we'll pass in our engine's connection. While adding just these two arguments will work, we can actually be more specific in importing our data. Extra parameters make sure the data's read in as expected. Let's walk through these parameters. The index column allows you to pass your primary key or another column you want to use as an index to your Pandas data frame. Coerce float looks at the columns containing numerical values and tries to convert these columns to use floating point numbers where valid. It's automatically set to true by default. Columns allows us to create a data frame with specific columns from our database, excluding…

Contents