Describe the issue
When trying to read in a SAS data set that has had observations removed from it using proc sql, those observations are still being displayed when I bring the file into Python using read_sas7bdat.
To Reproduce
/* Run the following code in SAS v9.4: */
libname temp "H:/temp/";
/* Creating a file with deleted observations...*/
data temp.file_with_deleted_obs;
set sashelp.cars;
run;
/* ...by using PROC SQL "delete from" */
proc sql;
delete from temp.file_with_deleted_obs where make='BMW';
quit;
proc contents data=temp.file_with_deleted_obs;
run;
import pyreadstat as py
df, _ = py.read_sas7bdat('H:/temp/file_with_deleted_obs.sas7bdat')
display(df.shape)
df.query('MAKE=="BMW"').reset_index(drop=True)
Expected behavior
df.query('MAKE=="BMW"').reset_index(drop=True)
should return 0 rows, instead it's returning 20.
Setup Information:
How did you install pyreadstat? pip
Platform (windows, macOS, linux, 32 or 64 bit) Windows
Python Version 3.13.5
Python Distribution (System, plain python, Anaconda) miniconda
Using Virtualenv or condaenv? condaenv
Describe the issue
When trying to read in a SAS data set that has had observations removed from it using proc sql, those observations are still being displayed when I bring the file into Python using read_sas7bdat.
To Reproduce
Expected behavior
should return 0 rows, instead it's returning 20.
Setup Information:
How did you install pyreadstat? pip
Platform (windows, macOS, linux, 32 or 64 bit) Windows
Python Version 3.13.5
Python Distribution (System, plain python, Anaconda) miniconda
Using Virtualenv or condaenv? condaenv