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.

Challenge: Import a data frame

Challenge: Import a data frame

From the course: SQL Server Machine Learning Services: Python

Start my 1-month free trial

Challenge: Import a data frame

(upbeat music) - [Instructor] We've seen a number of techniques for working with Python code in SQL Server, so let's apply some of those skills to a challenge. In the wide world importers database, take a look at the Warehouse.Colors table. You'll find a column called ColorName and one called ColorID. We'll use these for our data source. First, select all of the rows with a ColorID above 20, and then import them into a Python data frame. Next, create a script that'll print out some statistics about the data frame to the messages window. We saw how to use the shape data frame property to return the number of rows and columns that it contains. There's another property called size, and it returns the number of elements, or cells, that the data frame contains. We didn't look at size, but the syntax is identical to shape. See if you can get useful information from both of these. Finally, export the first 10 rows of the data frame to a SQL Server result set. It's possible to perform all of…

Contents