К python and sas

saspy 5.2.2

# Overview This package provides interfaces between Python and SAS. This package enables a Python developer to create mixed Python/SAS workflows to leverage the powers of both SAS and Python, by connecting a Python process to any of a variety of SAS deployments, where it will run SAS code. The SAS code is generated by the SASPy object and methods or explicitly user written. Results from SAS are returned as text, HTML5 documents (via SAS ODS), or as Pandas Data Frames. This package supports running analytics and returning the resulting graphics and result data to the Python process. It can convert data representations between SAS Data Sets and Pandas Data Frames.

This package has multiple access methods which allow it to connect to local or remote Linux SAS, IOM SAS on Windows, Linux (Including Grid Manager), or MVS, and local PC SAS. It can run within various Notebooks platforms, or IDE’s/UI’s or in interactive line mode Python or in Python batch scripts.

It is expected that the user community can, and will, contribute enhancements.

# Prerequisites — Python3.x or above — SAS 9.4 or above — SAS Viya 3 or above

# Connecting offering — Linux SAS: local or remote, including Grid Manager — Windows SAS: local or remote — MVS SAS: remote — Jupyter, Databricks and/or Zeppelin Notebooks — Interactive Line mode, Python IDE’s or other UI’s — Batch Python scripts

This package can be installed via pip or Conda. This will pull down the latest PyPI package and install it.

However, if that’s too easy, you can also download a specific release from [SASpy project releases page](https://github.com/sassoftware/saspy/releases), or just clone the repo and and instll from that. To install a given release, use the following, where the X.X.X is the release version you want.

All of the doc, including install and configuration information can be found at [sassoftware.github.io/saspy](https://sassoftware.github.io/saspy/).

Also, example Notebooks and use cases can be found at [sassoftware/saspy-examples](https://github.com/sassoftware/saspy-examples/).

# Contributing The [Contributing](https://github.com/sassoftware/saspy/blob/main/CONTRIBUTING.md) file explains the rules and conventions to follow while Contributing to this project. It also contains the Contributor Agreement instructions.

# Licensing Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at [LICENSE.txt](https://github.com/sassoftware/saspy/blob/main/LICENSE.md)

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Читайте также:  Html iframe src file

Источник

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 describe() and 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.

Dependencies¶

  • 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.

  • Installation
  • Configuration
    • sascfg_personal.py
    • sascfg_personal.py details
    • Choosing an Access Method
    • STDIO
    • SSH
    • IOM
      • Authentication:
      • ATTN, log4j vulnerabilities found in Dec 2021
      • ATTN, as of saspy version 3.3.3, the classpath is no longer required in your configuration file!
      • SAS IOM client Encryption Jars
      • The .authinfo file (_authinfo on Windows)
      • Remote
      • Local
      • Remote to MVS SAS
      • Initial import
      • Start a SAS session
      • Load data into SAS
        • CSV
        • Pandas DataFrame
        • Existing SAS data set
        • List the variables
        • See the first observations
        • Summary of numeric columns
        • Basic bar chart
        • Basic histogram
        • Basic heatmap
        • More about the target and input parameters
        • SAS Session Object
          • SASsession
            • SASsession.SYSERR()
            • SASsession.SYSERRORTEXT()
            • SASsession.SYSFILRC()
            • SASsession.SYSINFO()
            • SASsession.SYSLIBRC()
            • SASsession.SYSWARNINGTEXT()
            • SASsession.assigned_librefs()
            • SASsession.cat()
            • SASsession.dataframe2sasdata()
            • SASsession.datasets()
            • SASsession.df2sd()
            • SASsession.df_char_lengths()
            • SASsession.dirlist()
            • SASsession.disconnect()
            • SASsession.download()
            • SASsession.endsas()
            • SASsession.exist()
            • SASsession.file_copy()
            • SASsession.file_delete()
            • SASsession.file_info()
            • SASsession.lastlog()
            • SASsession.lib_path()
            • SASsession.list_tables()
            • SASsession.read_csv()
            • SASsession.sasdata()
            • SASsession.sasdata2dataframe()
            • SASsession.sasets()
            • SASsession.saslib()
            • SASsession.saslog()
            • SASsession.sasml()
            • SASsession.sasqc()
            • SASsession.sasstat()
            • SASsession.sasutil()
            • SASsession.sasviyaml()
            • SASsession.sd2df()
            • SASsession.sd2df_CSV()
            • SASsession.sd2df_DISK()
            • SASsession.set_batch()
            • SASsession.set_results()
            • SASsession.sil()
            • SASsession.simple_interest_loan()
            • SASsession.submit()
            • SASsession.submitLOG()
            • SASsession.submitLST()
            • SASsession.symexist()
            • SASsession.symget()
            • SASsession.symput()
            • SASsession.teach_me_SAS()
            • SASsession.upload()
            • SASsession.validvarname()
            • SASsession.write_csv()
            • SASdata
              • SASdata.add_vars()
              • SASdata.append()
              • SASdata.assessModel()
              • SASdata.bar()
              • SASdata.columnInfo()
              • SASdata.contents()
              • SASdata.delete()
              • SASdata.describe()
              • SASdata.head()
              • SASdata.heatmap()
              • SASdata.hist()
              • SASdata.impute()
              • SASdata.info()
              • SASdata.means()
              • SASdata.modify()
              • SASdata.obs()
              • SASdata.partition()
              • SASdata.rename()
              • SASdata.scatter()
              • SASdata.score()
              • SASdata.series()
              • SASdata.set_results()
              • SASdata.sort()
              • SASdata.tail()
              • SASdata.to_csv()
              • SASdata.to_df()
              • SASdata.to_df_CSV()
              • SASdata.to_df_DISK()
              • SASdata.to_frame()
              • SASdata.to_json()
              • SASdata.top()
              • SASdata.where()
              • SASProcCommons
              • SASresults
                • SASresults.ALL()
                • Utility
                  • SASutil
                    • SASutil.hpbin()
                    • SASutil.hpimpute()
                    • SASutil.hpsample()
                    • SASutil.univariate()
                    • SASml
                      • SASml.hp4score()
                      • SASml.hpbnet()
                      • SASml.hpclus()
                      • SASml.hpforest()
                      • SASml.hpneural()
                      • SASml.treeboost()
                      • SASstat
                        • SASstat.factor()
                        • SASstat.glm()
                        • SASstat.hplogistic()
                        • SASstat.hpreg()
                        • SASstat.hpsplit()
                        • SASstat.logistic()
                        • SASstat.mi()
                        • SASstat.mixed()
                        • SASstat.phreg()
                        • SASstat.reg()
                        • SASstat.tpspline()
                        • SASstat.ttest()
                        • SASets
                          • SASets.arima()
                          • SASets.autoreg()
                          • SASets.esm()
                          • SASets.expand()
                          • SASets.timedata()
                          • SASets.timeid()
                          • SASets.timeseries()
                          • SASets.ucm()
                          • SASets.varmax()
                          • SASets.x11()
                          • SASets.x12()
                          • SASqc
                            • SASqc.capability()
                            • SASqc.cusum()
                            • SASqc.macontrol()
                            • SASqc.shewhart()
                            • SASViyaML
                              • SASViyaML.bnet()
                              • SASViyaML.factmac()
                              • SASViyaML.fastknn()
                              • SASViyaML.forest()
                              • SASViyaML.gmm()
                              • SASViyaML.gradboost()
                              • SASViyaML.gvarclus()
                              • SASViyaML.kclus()
                              • SASViyaML.nnet()
                              • SASViyaML.rpca()
                              • SASViyaML.svdd()
                              • SASViyaML.svmachine()
                              • SASViyaML.treesplit()
                              • run_sas.py
                              • Using Batch mode
                              • Prompting
                              • Moving values between Python Variables and SAS Macro Variables
                              • Moving data between Python and SAS — datatype conversion
                              • Dates, Times and Datetimes, Oh my!
                              • Advanced sd2df and df2sd techniques
                              • 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.
                              • 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
                              • Overview
                                • Process
                                • SASLOG
                                  • Proc Printto
                                  • %abort macro and abort statement
                                  • Canceling submitted statements
                                  • Combining proc printto and abort cancel
                                  • printto= option on submit methods
                                  • Connection and configuration issues
                                    • Common diagnostics
                                    • STDIO
                                    • STDIO over SSH
                                    • IOM
                                      • Java problems
                                      • Classpath problems
                                      • IOM specific errors
                                      • My model didn’t run
                                      • Apache 2.0

                                      Index¶

                                      © Copyright 2018 SAS Institute Inc. All Rights Reserved..

                                      Источник

                                      Saved searches

                                      Use saved searches to filter your results more quickly

                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

                                      A Python interface module to the SAS System. It works with Linux, Windows, and Mainframe SAS as well as with SAS in Viya.

                                      License

                                      sassoftware/saspy

                                      This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

                                      Name already in use

                                      A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

                                      Sign In Required

                                      Please sign in to use Codespaces.

                                      Launching GitHub Desktop

                                      If nothing happens, download GitHub Desktop and try again.

                                      Launching GitHub Desktop

                                      If nothing happens, download GitHub Desktop and try again.

                                      Launching Xcode

                                      If nothing happens, download Xcode and try again.

                                      Launching Visual Studio Code

                                      Your codespace will open once ready.

                                      There was a problem preparing your codespace, please try again.

                                      Latest commit

                                      Git stats

                                      Files

                                      Failed to load latest commit information.

                                      README.md

                                      224493-SASPy-logo-OL-01

                                      This package provides interfaces between Python and SAS. This package enables a Python developer to create mixed Python/SAS workflows to leverage the powers of both SAS and Python, by connecting a Python process to any of a variety of SAS deployments, where it will run SAS code. The SAS code is generated by the SASPy object and methods or explicitly user written. Results from SAS are returned as text, HTML5 documents (via SAS ODS), or as Pandas Data Frames. This package supports running analytics and returning the resulting graphics and result data to the Python process. It can convert data representations between SAS Data Sets and Pandas Data Frames.

                                      This package has multiple access methods which allow it to connect to local or remote Linux SAS, IOM SAS on Windows, Linux (Including Grid Manager), or MVS, and local PC SAS. It can run within various Notebooks platforms, or IDE’s/UI’s or in interactive line mode Python or in Python batch scripts.

                                      It is expected that the user community can, and will, contribute enhancements.

                                      • Linux SAS: local or remote, including Grid Manager
                                      • Windows SAS: local or remote
                                      • MVS SAS: remote
                                      • Jupyter, Databricks and/or Zeppelin Notebooks
                                      • Interactive Line mode, Python IDE’s or other UI’s
                                      • Batch Python scripts

                                      This package can be installed via pip or Conda. This will pull down the latest PyPI package and install it.

                                      However, if that’s too easy, you can also download a specific release from SASpy project releases page, or just clone the repo and and instll from that. To install a given release, use the following, where the X.X.X is the release version you want.

                                      pip install https://github.com/sassoftware/saspy/archive/vX.X.X.tar.gz 

                                      All of the doc, including install and configuration information can be found at sassoftware.github.io/saspy.

                                      Also, example Notebooks and use cases can be found at sassoftware/saspy-examples.

                                      The Contributing file explains the rules and conventions to follow while Contributing to this project. It also contains the Contributor Agreement instructions.

                                      Licensed under the Apache License, Version 2.0 (the «License»); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE.txt

                                      Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an «AS IS» BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

                                      About

                                      A Python interface module to the SAS System. It works with Linux, Windows, and Mainframe SAS as well as with SAS in Viya.

                                      Источник

Оцените статью