Skip to content
Advertisement

Tag: sas

SAS Proc Transpose to Pyspark

I am trying to convert a SAS proc transpose statement to pyspark in databricks. With the following data as a sample: I would expect the result to look like this I tried using the pandas pivot_table() function with the following code however I ran into some performance issues with the size of the data: Is there a way to translate

Convert SAS data to a python dataframe

I have this small little code here to import a SAS file into dataframe in Python. The code runs forever without any output. The sas file I’m trying to import is 1.5gb. Answer You should use the native pandas function pandas.read_sas it’s faster than iterating through the file as you did. Here is the documentation of the pandas.read_sas function. This

Import SAS data file into python data frame

I’m working on a data set (PSID) that gives data in a SAS format (a .txt and another file containing instructions to interpret the data). I cannot find anything in Python to read this type of data. Does anyone know of a pre-existing module/script to read SAS data? Edit (added from a comment to an answer): The data is in

Advertisement