How to open pretrained models in python

Hi I'm trying to load some pretrained models from .sav files and so far nothing is working. The models were originally made in pytorch and when I open the raw file in vs-code I can see that all...

Converting .sav file to pandas dataframe

I'm in the process of writing a data checker to review spss files and need to programmatically handle different checks. The first step is to access an spss file, convert it to a pandas dataframe...

Why read_sas is converting strings to float?

I am trying to read a .sas7bdat file using pandas and I am having a hard time because pandas is converting strings values that look like a number into float. For example, if I have a telephone...

Using metadata to format columns of a database in Python

I am working with a database that originally is in ‘.sav’ format of SPSS. This database has columns of information that do not optimize memory usage (i.e, strings variables have left blank...

ERROR: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan

I am trying to install hdbscan in my PC which runs Windows 10 and has installed Python 3.6. My first attempt failed: (base) C:\WINDOWS\system32>pip install hdbscan --user Collecting hdbscan ...

Issue in reading spss file in python

I have installed pyreadstat using the below comment "pip install pyreadstat", but when I tried to import pyreadstat it says "ModuleNotFoundError: No module named 'pyreadstat'" Please help me to...

Is there any option to read SAS files meta.column types using pyreadstat

I have using pyreadstat library to read data and metadata of SAS data files. With respect to metadata, I can list out column names, length & labels but not column types. My requirement is to read...

Is it possible to use pandas and/or pyreadstat to read a large SPSS file in chunks, or does an alternative exist?

I have a SPSS database that I need to open, but it is huge and if opened naively as in the code below, it saturates RAM and eventually crashes. import pandas as pd def main(): data =...

Can not open .sav file (spss) in Python (which I had opened last year)

I am trying to access a .sav (spss) file which I had opened last year (I don't remember how) but I can't. What can be wrong? Here is my attempt: data =...

How to read SPSS aka (.sav) in Python

It's my first time using Jupyter Notebook to analyze survey data (.sav file), and I would like to read it in a way it will show the metadata so I can connect the answers with the questions. I'm...

How can I figure out why my Jupyter kernel is dying?

I've written a script in a Jupyter Notebook to read model specs from an Excel file (what should be predicted, from what variables, with what filter logic), run a series of models using xgboost,...

Identical predictions in XGBoost

When I've used XGBoost for regression in the past, I've gotten differentiated predictions, but using an XGBClassifier on this dataset is resulting in all cases being predicted to have the same...

Divide and Conquer Lists in Python (to read sav files using pyreadstat)

I am trying to read sav files using pyreadstat in python but for some rare scenarios I am getting error of UnicodeDecodeError since the string variable has special characters. To handle this I...

pd.read_sav and pyreadstat are so slow. how can i speed up pandas for big data if i have to use SAV/SPSS file format?

I've been transitioning away from SPSS for syntax writing/data management where I work to python and pandas for higher levels of functionality and programming. The issue is, reading SPSS files...

Pyinstaller not working for package (pyreadstat)

I always have used pyinstaller to create executables files but now when on working on a older project I am facing some issues. I have figured out that the main problem is while importing...

How to read DATA type from a sas7bdat file through pyreadstat?meta.original_variable_types giving different values?

import pyreadstat df, meta = pyreadstat.read_sas7bdat('c:/ae.sas7bdat') print(meta.original_variable_types) This code prints the values as following { "TRIAL_NAME":"$", ...

How to open .sav file on Jupyter Notebook?

I am trying to open my .sav file on JUpyter notebook and have tried the following (using pyreadstat) : import pandas as pd import pyreadstat df, meta =...

How do I get Pandas to read SPSS files?

I tried using the read_SPSS command, but it didn't work. The error seems to be telling me that I need pyreadstat, but I'm unable to even install that. Why, though, would I need pyreadstat? ...

Error when reading a SPSS file that is in Spanish with Pandas (Python)

Good morning! I am trying to work with a SPSS file (.sav) in Python. This is my code: import pandas as pd df=pd.read_spss('C:/Users/bonif/Documents/CSALUD01.sav') df.head() I get this...