SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
Roymadpis
Calcite | Level 5

Hi!

I am using SAS Enterprise Guide and I was wondering if there is a way to write python code directly in SAS, and if there is a way to do so if you can guide me on how.

 

examples for use cases I would like to perform:

I have data in a table in SAS and I want to perform several manipulations with Pandas

I have a CSV file and I want to read it using Pandas and perform manipulation on that data

 

Thanks ahead!

 

 

3 REPLIES 3
Ksharp
Super User
Check SAS Viya product .
Hope you have enough money to buy !
andreas_lds
Jade | Level 19

Contact your sas-admins they know if you can execute Python code in a sas-session.

AhmedAl_Attar
Ammonite | Level 13

@Roymadpis 

Check out this Blog Post SAS or Python? Why not use both? Using Python functions inside SAS programs 

The SAS on-line documentation has additional examples 

But be aware, there are pre-requisites for this functionality:

  • Python 3.x must be installed on your SAS Compute/Processing Server
  • Must have SAS 9.4 M6 / M7 release 
  • Must define two Environment Variables 
    • MAS_M2PATH: <location for SAS supplied mas2py.py script>
    • MAS_PYPATH:<Location of your Python binary>

Hope this helps

 

 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2949 views
  • 2 likes
  • 4 in conversation