Welcome back everyone in this video will cover how to execute arm python code in sequel server with machine learning services if you don’t already have ml services installed and enabled check-out the description below for links to learn how to get set up all right let’s get to it open sequel server management studio let’s talk about a real simple example you can copy past this code from the video description below sp execute external script is a special system stored procedure that enables rm python execution sequel there’s a language parameter that allows us to choose between python and R for today’s video I decided to shares examples and python but almost everything works the same for R there’s a script parameter you can paste your R python code let’s execute this example? If you do not see a result of seven please review our previous videos are visit the documentation below the other we ran this simple example let’s start adding more pieces. Machine learning services provides more natural communications between sequel and our python with an input data parameter that accepts any sql query for input data the parameter name is input data one you can see in the python code that they’re default variables to find past data between python and sequel the default variable names are output data set and input data set unless you decide to change them like this example see how I gave them an arbitrary name in the parameters and then adjusted my python code as well. Let’s execute this example. Have you noticed how each of these examples are terms or results with no column name. You can specify a name for the columns that return by adding this to the end of this statement with results sets which is a common separated list of call names and their data types. Right let’s discuss a little more about the input and output data types use between sequel python your input sequel selects statement passes a data frame to python relying on the python pandas package output from python back to see tool also needs to be an pandas data frame object if you need to convert from scalar values into data frame here’s two examples here variables c and d are both scalar which you can add two pandas series if you like and then convert them to pandas data frame this one shows a little bit more of a complicated example please read up on the pandas documentation for more examples congratulations you now know the basics execute r in python and t sequel feel free like this video leave a comment below ask questions or even tell us about the awesome ways you operationalize machine learning in your sequel databases.