When is Python a good choice to use in conjunction with SAS for data management/integration tasks?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

When is Python a good choice to use in conjunction with SAS for data management/integration tasks?

Wise and sage Wisepeople and Sages,

 

I have been asked by my supervisor to "do something with Python" because he believes I need to diversify my skillset. I have tried to explain that SAS in combination with what I can do from the UNIX command line is extraordinarily versatile without forcing me to go deep into the syntax of half a dozen different languages. But he insists, so without a practical entry point, I ask of you, are there places where you defer to Python as a solution for data management/integration in addition to your SAS powers?

 

Chris


Accepted Solutions
Solution
‎02-26-2018 11:41 AM
Regular Contributor
Posts: 150

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

I am going to respond w/o using python since I use C#. I absolutely believe in combining technologies. For example, how do you do a website using SAS? You don't. I can stand up a Web API system, use very powerful regex with C#, build UIs, consume web services, etc. All of those are challenges in the SAS world. Whether it is JSON, XML, SOAP, etc. I find C# easier and more powerful. I use SAS and C# almost daily. They each have their areas.

 

I encourage you to branch out and combine them. Look at saspy.

View solution in original post


All Replies
Super User
Super User
Posts: 9,599

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

I tend to use Python when the mice breed too much.  Without a goal or reason for using something you are really most likely to fail at learning it.  Hence why most courses have module aims and tests at the end of modules.

 

I would have a look at the python site, and all the packages you can add to it, maybe something will grab your attention.

 

Simply put though a programming language is merely a means for people to tell the machine to do something, much like language is a means to get points across, if you don't know what the points are it doesn't matter if you use English, or French, or Ancient stone bashing, there has to be a point in using in the first place.

Respected Advisor
Posts: 2,981

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

Certainly, Python has "pacakges" of statistical analyses or mathematical analyses that are not programmed into SAS. But if you're going to do a regression, and you know how to do PROC REG, it's hard to see the benefit of doing it in Python, unless learning to use Python is a defined goal for you. Normally, in the places I have worked, goals are spelled out clearly, both you and your supervisor agree to them, you should be allowed to spend time on this, and you should receive the proper acknowledgement and reward for meeting your goals. If your supervisor is just asking you to use Python in an off-hand conversation, I wouldn't feel too comfortable with that. If learning Python is specifically in your goals, both you are your supervisor agree to this, and you will be allowed to spend time on this and rewarded appropriately when you are successful, then that's fine in my opinion.

--
Paige Miller
Trusted Advisor
Posts: 1,337

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

If it's about your skill set, I'd say the unchallengeable advantage in learning python is that you are developing skills in using a free computer language.  Which presumably widens your pool of potential employers.  Perhaps your employer has dreams of saving sas licensing fees, but that would require discussing many more issues than your question.

 

I have never used python, but am looking at saspy (using sas modules as python calls).  Maybe that would be a good way to start - write python code that runs sas proc's.  You'd then know a little python and be able to develop python code to do work that might not be a great fit for SAS.  In my research group there was a "bag of words" program developed in python to help in text analysis.  I have the impression that text processing might be a more natural setting for python programming than for sas code.  But it's an impression, not even an observation.

Occasional Contributor
Posts: 15

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

[ Edited ]

Thanks @mkeintzet al. It's a bit odd. In our case it's not about expense. SAS isn't going anywhere. It's a command without a target. Go do something for the sake of doing it. I was just hoping there was an obvious efficiency that I was missing.

 

For example, sure I could write raw Python code to integrate data but I'd rather do it in Data Integration Studio where I'm building an inherent metadata trail. I suppose I could build my own integration application, but why spend time on that when SAS R&D is going to have many smarter heads than mine on it? That's where the opportunity costs pile up.

I think my boss sees this as a more modern way to do something. It's gaining market share and all. But that's because most folks don't have the benefit of SAS. This wasn't supposed to turn into a marketing promo. And yet, it did.

Maybe I'll just show up with an actual python with my laptop inside it and say "I ran into a bandwidth issue."

Chris

Regular Contributor
Posts: 150

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

Chris,

 

I wanted to add something else after reading the comments more. If I challenged a developer (and I have managed them before) to learn something, I would expect them to do it. One thought.

 

When you learn multiple skillsets, it forces the thinking to be different. Love SAS, used it for 30 years, worked at SAS, but Viya will change that landscape. I prefer using C# with SAS vs relying on SAS for everything. I can run circles around SAS on Excel. You have no chance of competing with C# libraries on Excel (or any part of Office for that matter): absolutely zero chance.

 

Python is an elegant OOP solution. It is not as good as C# IMO but that is a different story.

 

Perhaps management has decided to use Viya in the near future. If so, they may want you to branch out to get you prepared for it.

Solution
‎02-26-2018 11:41 AM
Regular Contributor
Posts: 150

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

I am going to respond w/o using python since I use C#. I absolutely believe in combining technologies. For example, how do you do a website using SAS? You don't. I can stand up a Web API system, use very powerful regex with C#, build UIs, consume web services, etc. All of those are challenges in the SAS world. Whether it is JSON, XML, SOAP, etc. I find C# easier and more powerful. I use SAS and C# almost daily. They each have their areas.

 

I encourage you to branch out and combine them. Look at saspy.

Occasional Contributor
Posts: 15

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

@AlanCappreciate the perspective. I'm not being flippant. There are all kinds of scenarios where coding methods outside of SAS have provided me with more complete and teachable solutions. I was just looking for a practical entry point. I'll check out SasPy as a jumping off point.

 

Chris

Respected Advisor
Posts: 4,736

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

[ Edited ]

@chawkins

I'd take this as an opportunity to learn something new. I'd certainly ask what the expected outcome is and how much time I can spend but else "thank you very much for the opportunity. great!".

 

Python is a SAS endorsed open source language. As such some python packages come already as part of a modern SAS installation (I believe).

Given that you ask your question in a SAS forum I assume your starting point is SAS. As such I'd start with figuring out how Python integrates with SAS. Start Googling to find links like: https://github.com/sassoftware/enlighten-integration

 

My own Python skills are very limited but the one thing I've seen so far which I really liked is List Processing - and I'd wish the SAS Base SAS language would offer something similar.

 

Another reason to get into Python: It integrates well with SAS (and will integrate even better in the future as much as I know) and it has a lot of different packages. You might for example have a use case where you would need text mining capabilities but you haven't licensed the SAS module for it. In such a case using an open source Python module for the task could be a way around it.

 

....so: I can only wish for my manager to give me such a task. I'd go straight into hiding, hope to get forgotten and use my chance to learn as much as I can while being fully paid ;-)

Super User
Posts: 10,761

Re: When is Python a good choice to use in conjunction with SAS for data management/integration task

Python is generally used for Data Minging,Machine Learing, AI ,Block Chain .......  .Most are Computer Science. if you were CS student, That would benefit you a lot on account of finding many different jobs more than SAS .

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 215 views
  • 2 likes
  • 7 in conversation