In the last section of this chapter, you are going to learn how to use Python with SQL Server and in SQL Server. You can use two scalable libraries, the revoscalepy and MicrosoftML libraries, which correspond to equivalent R libraries. You can also read SQL Server data by using ODBC. You can use the pyodbc package for this task. The following code imports all the necessary libraries for this section:
import numpy as np import pandas as pd import pyodbc; from revoscalepy import rx_lin_mod, rx_predict, rx_summary
Now it is time to read SQL Server data. Note that like for R, I also used the ODBC Data Sources tool to create a system DSN called AWDW in advance. It points to my AdventureWorksDW2014 demo database. For ...