How do you convert .sav into .csv, or .sav into pandas DataFrame? Is there a direct way or doing this or a package that can do this?
How to convert .sav file into csv file
Which .sav format are you asking about? Which program or library was used to create the .sav file? –
Denmark
It's an old SPSS file, I just want to manipulate it with Pandas –
Evocator
You are probably looking for the pyreadstat module, you can find some code snippet to start on the github page.
I've followed the code and get an error, "from .pyreadstat import read_sas7bdat, read_xport, read_dta, read_sav, read_por, read_sas7bcat ImportError: DLL load failed: The specified module could not be found." –
Evocator
did you install the module using
pip
? –
Mycology Why would this make a difference? I just use Pycharm interface and manually install these libraries from there –
Evocator
maybe this can help you –
Mycology
GNU PSPP project (replacement for the proprietary program SPSS) has a helper tool to do this online - https://pspp.benpfaff.org/
To do this locally 1. Download GNU PSPP - http://www.gnu.org/software/pspp/get.html 2. Use command line to do the conversion
pspp-convert <input.sav> <output.csv>
Similar question - How to open spss data files in excel?
You are probably looking for the pyreadstat module, you can find some code snippet to start on the github page.
I've followed the code and get an error, "from .pyreadstat import read_sas7bdat, read_xport, read_dta, read_sav, read_por, read_sas7bcat ImportError: DLL load failed: The specified module could not be found." –
Evocator
did you install the module using
pip
? –
Mycology Why would this make a difference? I just use Pycharm interface and manually install these libraries from there –
Evocator
maybe this can help you –
Mycology
© 2022 - 2024 — McMap. All rights reserved.