Date: Oct 08, 2021 Version: 3.7.5
Source Repository: http://github.com/sassoftware/saspy
Issues and Ideas: https://github.com/sassoftware/saspy/issues
Example Repo: https://github.com/sassoftware/saspy-examples
What is this?¶
This module provides Python APIs to the SAS system. You can start a SAS session and run analytics from Python through a combination of object-oriented methods or explicit SAS code submission. You can move data between SAS data sets and Pandas dataframes and exchange values between python variables and SAS macro variables.
The APIs provide interfaces for the following:
- Start a SAS session on the same host as Python or a remote host.
- Exchange data between SAS data sets and Pandas data frames.
- Use familiar methods such as
head()to work with data.
Additional functionality such as machine learning, econometrics, and quality control are organized in Python classes.
See Getting started for programming examples.
- Python3.4 or higher.
- SAS 9.4 or higher. SAS Viya 3.1 or higher is also supported.
- To use the integrated object method (IOM) access method (one of four connection methods) requires Java 7 or higher on the client.
You can connect to SAS on any platform that is supported for the specified SAS releases.
- Getting started
- Initial import
- Start a SAS session
- Load data into SAS
- Explore the data
- Submit SAS code directly from Python session
- Split the data into training and test
- Build an analytical model
- Evaluating model diagnostics
- API Reference
- Advanced topics
- Using Batch mode
- Moving values between Python Variables and SAS Macro Variables
- Slow performance loading SAS data into a Pandas DataFrame ( to_df(), sd2df() )
- Slow performance loading a DataFrame into a SAS data set; df2sd()
- Using Proc iomoperate to find Object Spawner hosts and Workspace Server ports
- Disconnecting from an IOM session and reconnecting back to it.
- Configuring Grid Option Sets to have saspy run on a specific Queue.
- Dates, Times and Datetimes, Oh my!
- Advanced sd2df and df2sd techniques
- Automatic checking for ERROR: in the LOG and the warnings module
- saspy.logger from logging.logger as of V3.7.5
- SASsession object as a context manager as of V3.7.5
- Jupyter magics
- Contributing new methods
- Limitations, restrictions and work arounds