sas

Is there an equivalent for the SAS "intnx" command in python?

Is there an equivalent for the SAS "intnx" command in python? Question: I am a beginner in python and stuck on translating a piece of code from SAS to Python (see below). How would I recreate the "intnx"-command in line 10 in Python, which introduces a 3-month-lag to the actual date (datadate) in order to …

Total answers: 1

Convert SAS proc sql to Python(pandas)

Convert SAS proc sql to Python(pandas) Question: I rewrite some code from SAS to Python using Pandas library. I’ve got such code, and I have no idea what should I do with it? Can you help me, beacase its too complicated for me to do it correct. I’ve changed the name of columns (for encrypt …

Total answers: 3

how to include external code in Python similar as %include in SAS?

how to include external code in Python similar as %include in SAS? Question: I am trying to define a variable list var_list which includes hundreds of variables. So I want to do something similar as SAS to put this definition in an external code instead of the main code. Is there anyway to do that? …

Total answers: 2

Large, persistent DataFrame in pandas

Large, persistent DataFrame in pandas Question: I am exploring switching to python and pandas as a long-time SAS user. However, when running some tests today, I was surprised that python ran out of memory when trying to pandas.read_csv() a 128mb csv file. It had about 200,000 rows and 200 columns of mostly numeric data. With …

Total answers: 6

Experience with using h5py to do analytical work on big data in Python?

Experience with using h5py to do analytical work on big data in Python? Question: I do a lot of statistical work and use Python as my main language. Some of the data sets I work with though can take 20GB of memory, which makes operating on them using in-memory functions in numpy, scipy, and PyIMSL …

Total answers: 2