sassoftware / saspy

A Python interface module to the SAS System. It works with Linux, Windows, and Mainframe SAS as well as with SAS in Viya.
https://sassoftware.github.io/saspy
Other
367 stars 149 forks source link

Has anyone tried reading a .spds9 file using SASPY? #540

Closed sourabh2404 closed 1 year ago

sourabh2404 commented 1 year ago

Hi has anyone tried importing a .spds9 file to a pandas dataframe ? If so, how?

Thanks!

tomweber-sas commented 1 year ago

Well, that's an sdpe table. So you would just assign a libref with the spde engine for the spde data sets you want to process. It's SAS that reads SAS datasets and then saspy converts them to data frames. So something like this


sas.saslib(libref='spd, engine='SPDE', path='/whevever/they/are')
df = sas.sd2df(table='sdpe_table', libref='spd')
tomweber-sas commented 1 year ago

Were you able to get at your spde table?

tomweber-sas commented 1 year ago

Let me know if you need anything. I'll close this as there's not really an issue jere. If you're having trouble, reopen or reach out with an other issue. Thanks, Tom

sourabh2404 commented 1 year ago

Hi Tom,

Apologies for the late reply. I tried the above way but facing some issue. Is there a trial version or testing environment like (academics/ university edition) where I can test the code with the files on SPD engine?

tomweber-sas commented 1 year ago

Yes, there's SAS ODA: https://www.sas.com/en_us/software/on-demand-for-academics.html, and that should get you to these instructions, too, the connection details for SASPy, for once you're signed up: https://support.sas.com/ondemand/saspy.html