Resources

SAS University Edition: Help Center


How do I get started using SASPy?

When you are using the SASPy module in Jupyter Notebook for SAS University Edition, you must first import the SASPy module and then create a connection to SAS. You can use the sasdata method to access SAS data.


To run the SASPy module

  1. On the Notebook Dashboard, select New > Python 3. A new Jupyter notebook file with an empty code cell opens in a separate browser tab.

    New menu in Notebook Dashboard with Python 3  option selected

  2. To import the SASPy module, enter the following command and click Jupyter Notebook Run button:

    import saspy

  3. To start a SAS session, enter the following connection statement and click Jupyter Notebook Run button:

    sas = saspy.SASsession()

    You can now enter Python 3 code in a code cell and run it using the SAS server in SAS University Edition.

To access a SAS data set

Note For more information about getting started with SASPy and accessing other types of data, see Getting started with SASPy.