In [3]:
import saspy
sas = saspy.SASsession(cfgname='winlocal')
iris = sas.sasdata("iris","SASHELP")
iris.describe()
SAS Connection established. Subprocess id is 13168
Out[3]:
| Variable | Label | N | NMiss | Median | Mean | StdDev | Min | P25 | P50 | P75 | Max | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | SepalLength | Sepal Length (mm) | 150.0 | 0.0 | 58.0 | 58.433333 | 8.280661 | 43.0 | 51.0 | 58.0 | 64.0 | 79.0 |
| 1 | SepalWidth | Sepal Width (mm) | 150.0 | 0.0 | 30.0 | 30.573333 | 4.358663 | 20.0 | 28.0 | 30.0 | 33.0 | 44.0 |
| 2 | PetalLength | Petal Length (mm) | 150.0 | 0.0 | 43.5 | 37.580000 | 17.652982 | 10.0 | 16.0 | 43.5 | 51.0 | 69.0 |
| 3 | PetalWidth | Petal Width (mm) | 150.0 | 0.0 | 13.0 | 11.993333 | 7.622377 | 1.0 | 3.0 | 13.0 | 18.0 | 25.0 |
In [1]:
# Connect to the SAS OnDemand for Academics Servers from a Python interface
import saspy
sas_session = saspy.SASsession()
iris = sas_session.sasdata("iris","SASHELP")
iris.describe()
Using SAS Config named: winlocal SAS Connection established. Subprocess id is 2520
Out[1]:
| Variable | Label | N | NMiss | Median | Mean | StdDev | Min | P25 | P50 | P75 | Max | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | SepalLength | Sepal Length (mm) | 150.0 | 0.0 | 58.0 | 58.433333 | 8.280661 | 43.0 | 51.0 | 58.0 | 64.0 | 79.0 |
| 1 | SepalWidth | Sepal Width (mm) | 150.0 | 0.0 | 30.0 | 30.573333 | 4.358663 | 20.0 | 28.0 | 30.0 | 33.0 | 44.0 |
| 2 | PetalLength | Petal Length (mm) | 150.0 | 0.0 | 43.5 | 37.580000 | 17.652982 | 10.0 | 16.0 | 43.5 | 51.0 | 69.0 |
| 3 | PetalWidth | Petal Width (mm) | 150.0 | 0.0 | 13.0 | 11.993333 | 7.622377 | 1.0 | 3.0 | 13.0 | 18.0 | 25.0 |