BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
naveen_srini
Quartz | Level 8

Dear SAS Community,

Has anybody used SAS and Python in a data science role or in general for whatever purpose. Lately, the senior management of company has been contemplating extensively on the usage of Python along with SAS. Is Python similar to SAS? or is it used in conjunction with SAS to utilize a combination of functionality?If so how? Can anybody explain with practical examples of the combined usage in the Banking, Financial services and Insurance industry?

Any help would be greatly appreciated. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
naveen_srini
Quartz | Level 8

Editor's note: Since this topic was raised in 2015, SAS has released an open source project named SASPy, which allows you to access SAS from Python and mix Python and SAS features.  SAS has support for programming in a Python/Jupyter notebook environment.In addition, @AriZitin created the Python Integration with SAS tutorial below. Use these outline links to skip to the topic that interests you:

 

01:14 – Useful Python Packages: SWAT and pandas

02:15 – Connecting to CAS and Accessing In-memory Data

07:21 – Bring Data Locally to use Pandas

11:48 – Handling Missing Values

13:20 – Preparing for Predictive Modeling

15:20 – Building a Decision Tree Model

17:20 – Scoring and Assessing the Decision Tree Model

19:15 – Analyzing Results Locally

23:02 – Building other Models - Random Forest Model and Gradient Boosting Model

29:55 – More CAS Actions that can be Submitted from Python.

 

For a fullscreen experience, view the tutorial on YouTube:

Watch Now

 

 

Dear Sir and others, Thank you so much for the responses. I created this discussion a while ago, and I'm glad to see there are at least 3 responses. Well, to give you an idea, the IT services division of our company work with finance and insurance data precisely in Credit Risk, Actuaries largely in Basel 2 modeling, Customer propensity, financial product pricing and Retention. I fully agree there wasn't really a need for Python to come into the picture as SAS's utility met the requirements.

 

As the design folks are moving gradually to machine learning with the usage of advanced algorithims, the notion of Python ever came to their mind I suppose, while we the so the called developers in the team are mostly from SAS background, the challenge we are facing is learning and getting comfortable in python to make it actionable in real quick time, and mitigating the need of Python by making SAS do more of the work but at the same time not having to rely on expensive SAS tools(SAS being awfully expensive). Also, they(senior management) are having tons of discussions of incorporating everything in django framework(I don't know what is this-some english letters) and beyond.

 

Funny enough, all this is happening at a time, we SAS users are becoming comfortable with SAS, making the learning rather very steep.

 

Thanks very much indeed for your thoughts. I really appreciate it.

 

Cheers,

Naveen Srinivasan

L&T Infotech

 

View solution in original post

9 REPLIES 9
LinusH
Tourmaline | Level 20

Hi, I'm not a Python programmer, but I have a general idea of what it does.

When you sat data science, can you be abit more specific? Responsibilities, tasks, input/transformation/result types?

Since both SAS and Python is quite generic, I don't think the industry matters, rather the job function.

That said, I think SAS (I refer to the SAS data squeezing, analysing and reporting capabilities) is a good match for data scientist.

Python on the hand is more suited for application development, not primarily for ad hoc query and reporting.

Data never sleeps
Reeza
Super User

That depends on how much of the job is data management vs analytics.

For analytics python/SAS are different but both are very good. If you're working on new statistical algorithms or machine learning then Python has more features available than SAS. 

If you're doing data management then SAS is preferable in my opinion.  I prefer a semi-visual interface rather than just command line syntax.

The languages are different, Python is closer to R, so there's also a learning curve to switch over.  I believe Python is also in-memory so there are data size considerations that would need to be considered as well.

MattDSS
Fluorite | Level 6

I had extensive experience with Python for my doctoral in computation mathematics. In my work, I use SAS.

They are different tools for different purposes. SAS is more a dedicated software for doing statistical analysis while Python is a generic programming language which would let you do a lot more. This is what it comes down to - SAS is more dedicated to data analysis and Python is more general. It is important to keep this distinction in mind. Python can probably do everything SAS does, but for more data related tasks, SAS already developed really comprehensive tools to deal with them.

If your work only has a limited number of things you need to do - for example, data reporting on large gigabytes amount of data, then go with SAS. If your work needs a lot of complex computation and they are always changing - for example, you are researching the most innovative way to simulate the stock market, possibly with advance parallelisation, then a generic programming language would be better.  I could never have written my phd thesis in SAS because it would be a nightmare to write the advance algorithms in SAS. In work, I wouldn't really use Python because SAS has dedicated tools to deal with large data (though Python is catching up too).

naveen_srini
Quartz | Level 8

Editor's note: Since this topic was raised in 2015, SAS has released an open source project named SASPy, which allows you to access SAS from Python and mix Python and SAS features.  SAS has support for programming in a Python/Jupyter notebook environment.In addition, @AriZitin created the Python Integration with SAS tutorial below. Use these outline links to skip to the topic that interests you:

 

01:14 – Useful Python Packages: SWAT and pandas

02:15 – Connecting to CAS and Accessing In-memory Data

07:21 – Bring Data Locally to use Pandas

11:48 – Handling Missing Values

13:20 – Preparing for Predictive Modeling

15:20 – Building a Decision Tree Model

17:20 – Scoring and Assessing the Decision Tree Model

19:15 – Analyzing Results Locally

23:02 – Building other Models - Random Forest Model and Gradient Boosting Model

29:55 – More CAS Actions that can be Submitted from Python.

 

For a fullscreen experience, view the tutorial on YouTube:

Watch Now

 

 

Dear Sir and others, Thank you so much for the responses. I created this discussion a while ago, and I'm glad to see there are at least 3 responses. Well, to give you an idea, the IT services division of our company work with finance and insurance data precisely in Credit Risk, Actuaries largely in Basel 2 modeling, Customer propensity, financial product pricing and Retention. I fully agree there wasn't really a need for Python to come into the picture as SAS's utility met the requirements.

 

As the design folks are moving gradually to machine learning with the usage of advanced algorithims, the notion of Python ever came to their mind I suppose, while we the so the called developers in the team are mostly from SAS background, the challenge we are facing is learning and getting comfortable in python to make it actionable in real quick time, and mitigating the need of Python by making SAS do more of the work but at the same time not having to rely on expensive SAS tools(SAS being awfully expensive). Also, they(senior management) are having tons of discussions of incorporating everything in django framework(I don't know what is this-some english letters) and beyond.

 

Funny enough, all this is happening at a time, we SAS users are becoming comfortable with SAS, making the learning rather very steep.

 

Thanks very much indeed for your thoughts. I really appreciate it.

 

Cheers,

Naveen Srinivasan

L&T Infotech

 

Kurt_Bremser
Super User

Django is a web applicaton framework. It is to data warehousing what a delivery truck might be to apples and oranges.

What you experience could be the outcome of some manager having a talk with a friend over some alcoholic beverages, and said friend told him (without knowing what your company actually does): "Try django! It's the new thing!"

Buzzword dropping.

OTOH, you might be able to fit the reports from SAS (or any other reporting/statistic tool) into the Web framework.

Regarding Python:

Like with R, it can't replace SAS as a data warehousing tool; but it might be very useful (with its statistical libraries) to do advanced statistics after the data has been prepared in SAS.

CK2
Calcite | Level 5 CK2
Calcite | Level 5
I just created a profile to like your response - we have a client who is looking for someone with Python and SAS and your response really helped me understand the relationship between the two. Thank you!
Kurt_Bremser
Super User

If the "senior management" (which often translates to "immature imbeciles who couldn't find their ass even when sitting on their own hands") has no idea what Python and SAS are for, tell them to stick to managing and don't waste your time.

Python is a programming language (which has scientific and statistical functions in its standard library), SAS is a data warehousing system. In Python you would have to program a metadata repository or the like on your own.

naveen_srini
Quartz | Level 8

"senior management" (which often translates to "immature imbeciles who couldn't find their ass even when sitting on their own hands")

I love that line hahahahaha:smileylaugh::smileylaugh:

MattDSS
Fluorite | Level 6

In the end, it really depends on

1) how big your data sets are -> data that you cannot hold in RAM will need more advance Python

2) how "stable" are your code -> if you are always running a few standard procedures then SAS may be better

3) your team's technical capacity -> no good trying to move to Python if your team has no skills in this area

Python is an infinitely more intuitive programming language to learn... in my opinion.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 18405 views
  • 4 likes
  • 6 in conversation