Resources

SAS University Edition: Help Center


How do I get started using SASPy?

When you are using the SASPy module in JupyterLab 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. If you do not have a Launcher tab open in the main work area, click New Launcher button on the File Browser tab. From the Launcher tab, click the Python 3 kernel in the Notebook area. A new Jupyter notebook file with an empty code cell opens in a separate tab.

    Launcher tab with Python 3 kernel selected

  2. To import the SASPy module, enter the following command and click Run the selected cells and advance button:

    import saspy

  3. To start a SAS session, enter the following connection statement and click Run the selected cells and advance 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 the following resources: