selik / xport

Python reader and writer for SAS XPORT data transport files.
MIT License
49 stars 24 forks source link

fix encoding to enable reading of https://wwwn.cdc.gov/Nchs/Nhanes/20… #109

Open gorefbitim opened 1 year ago

gorefbitim commented 1 year ago

I tried to open this the following government file

with the following code:

with open(filename, 'rb') as f:
    data = xport.v56.load(f)

But it crashed. To fix this, I need to change the encoding as given in the PR.

Please help me do cancer and other age related disease research by accepting this PR !