itzy
itzy

Reputation: 11765

Read SAS file with pandas

I'm trying to use the pandas read_sas() function.

First, I create a SAS dataset by running this code in SAS:

libname tmp 'c:\temp';  
data tmp.test;
    do i=1 to 100;
        x=rannor(0);
        output;
    end;
run;

Now, in IPython, I do this:

import numpy as np
import pandas as pd

%cd C:\temp
pd.read_sas('test.sas7bdat')

Pretty straightforward and seems like it should work. But I just get this error:

TypeError: read() takes at most 1 argument (2 given)

What am I missing here? I'm using pandas version 0.18.0.

Upvotes: 3

Views: 13757

Answers (1)

TED Zhao
TED Zhao

Reputation: 59

According issue report linked below, this bug will be fixed in 18.1.

https://github.com/pydata/pandas/issues/12647

Upvotes: 1

Related Questions