Load/read .sps output file in pandas python

Issue #81 new
Marie created an issue

Hi! I have run analysis on the data .sav file in SPSS and created an output file .sps - is there a way to load this into pandas like I can load a .sav file? I am easily able to upload the data file. Here is how I load the data file:

import pandas as pd
import savReaderWriter as spss

with spss.SavReaderNp ("file_name.sav") as reader:
    records = reader.all()
df = pd.DataFrame(records)
df.head()

When I try to replace the .sav file with a .sps output file, the error I get is:

SPSSIOError: Problem opening file b'/home/outputfile.sps' in mode 'rb' [SPSS_INVALID_FILE]

Thanks!

Comments (0)

  1. Log in to comment