Python sas7bdat module usage

后端 未结 4 919
温柔的废话
温柔的废话 2021-02-20 12:41

I have to dump data from SAS datasets. I found a Python module called sas7bdat.py that says it can read SAS .sas7bdat datasets, and I think it would be simpler and more straigh

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 13:00

    As time passes, solutions become easier. I think this one is easiest if you want to work with pandas:

    import pandas as pd
    df = pd.read_sas('/support/sas/locked_data.sas7bdat')
    

    Note that it is easy to get a numpy array by using df.values

提交回复
热议问题