From the course: SQL Server Machine Learning Services: Python

Unlock the full course today

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

Produce graphics with MatPlotLib

Produce graphics with MatPlotLib

From the course: SQL Server Machine Learning Services: Python

Start my 1-month free trial

Produce graphics with MatPlotLib

- [Instructor] The Matplotlib package is a popular choice with Python programmers that want to export two dimensional charts and other data visualization graphics. It comes installed with the Anaconda Distribution, so we can jump right in and start exporting graphics with a little Python code in SQL Server. In the WideWorldImporters database is a table called Application.Cities. Let's right click on it and choose Select Top 1,000 Rows. Each city in this table has its own ID number, as well as, the ID of the state or province that it's in. I'm going to write a quick select query to summarize this information. The result of this query is going to list out each state or province ID number here, and then we have a count of the number of cities in each one. Let's take this information and create a bar chart to visualize it using a Python script that leverages the Matplotlib library. I'm going to cut everything here to my clipboard, and then we'll start writing out the Python script. For…

Contents