Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python, using only Pandas and Numpy, solve the following problem (Note: You may NOT use any loops): 1. The column 'reason_code' in the file
In Python, using only Pandas and Numpy, solve the following problem (Note: You may NOT use any loops): 1. The column 'reason_code' in the file data.csv gives codes for discharges. Determine which codes (and the corresponding outcomes from the ID file, info.csv) resulted in no readmissions ('NO' under 'readmitted'). Then find the top-5 outcomes that resulted in readmissions, in terms of the percentage of times readmission was required.
Sample data:
data.csv
id, gender, reason_code, readmitted
1, male, 3, NO
2, female, 2, NO
3, female, 5, >30
4, male, 1, NO
5, male, 2, >30
info.csv:
facility_id, name
123, Main
232, East
113, West
reason_code, outcome
1, transfer to another facility
2, hospice
3, expired
4, discharge to home
5, left AMA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started