I am trying to read an spss (.sav) file in spyder (python 3.8) and I have installed the pyreadstat module from Anaconda (1.1.7). It appears the installation was successful as I can see the module files in my system folder - "C:.........\Anaconda3\Lib\site-packages\pyreadstat".
I have ran the below code but I keep getting a "cannot import error."
- Error:
ImportError: cannot import name 'read_sas7bdat' from 'pyreadstat' (C:........\Anaconda3\Lib\site-packages\pyreadstat\pyreadstat.cp38-win_amd64.pyd)
- Code:
import os
import pandas as pd
import pyreadstat
data = pyreadstat.read_sav('file path to data')
Please can you assist me with a solution.
Thanks.