Convert a .sav file to .csv file in Python

前端 未结 4 568
面向向阳花
面向向阳花 2021-01-17 07:28

I want to convert the contents of *.sav file into a *.csv file in Python. I have written the following lines of code to access the details of variables in *.sav file. Now, I

4条回答
  •  滥情空心
    2021-01-17 07:42

    I know that this solution uses R instead of python, but it is really simple and works well.

    library(foreign)
    write.table(read.spss("inFile.sav"), file="outFile.csv", quote = TRUE, sep = ",")
    

提交回复
热议问题