Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please is there a python function to identify a boolean in large dataset ? with 30+ column ?

The beneficiary summary file has several chronic illness columns for each member. These are Boolean fields.
1)Convert these columns into a single categorical variable, concatenating multiple True diagnoses.
2)If a member has 3 or more chronic conditions, categorise these as “Multiple”

What I have tried:

This is the link to the data set

https://www.cms.gov/Research-Statistics-Data-and-Systems/Downloadable-Public-Use-Files/SynPUFs/Downloads/DE1_0_2009_Beneficiary_Summary_File_Sample_20.zip

This is the several chronic illness columns
SP_ALZHDMTA
SP_CHF
SP_CHRNKIDN
SP_CNCR
SP_COPD
SP_DEPRESSN
SP_DIABETES
SP_ISCHMCHT
SP_OSTEOPRS
SP_RA_OA
SP_STRKETIA
Posted

1 solution

Is there a function that will comb through a dataset and automatically append data for you based on columns values?

No.

You have to write the functionality yourself.
 
Share this answer
 
Comments
PARISEZINNE12 25-Jan-24 2:45am    
This is the link to the dataset where the columns are provided :

https://www.cms.gov/Research-Statistics-Data-and-Systems/Downloadable-Public-Use-Files/SynPUFs/Downloads/DE1_0_2009_Beneficiary_Summary_File_Sample_20.zip
PARISEZINNE12 25-Jan-24 4:11am    
i need to know if theres is a function to identify boolean column in a large data set and there fore converting those column into a single categorical variable
Dave Kreskowiak 25-Jan-24 10:13am    
Just repeating the same stuff you've already said does not change the answers.

And, no, I'm not going to be writing the code for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900