Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Python Using bank_train data set from https://bcs.wiley.com/he-bcs/Books?action=resource&bcsId=11712&itemId=1119526817&resourceId=46601 Combine the job categories according to the following response percentages: 0 < 10, 10 < 25, 25
Using Python
Using bank_train data set from https://bcs.wiley.com/he-bcs/Books?action=resource&bcsId=11712&itemId=1119526817&resourceId=46601
Combine the job categories according to the following response percentages: 0 < 10, 10 < 25, 25 < 33. Name the new variablejob2.
Based off the data frame percent_job shown below
Current code:
bank_train = pd.read_csv("$file") crosstab_response_job = pd.crosstab(bank_train['response'], bank_train['job']) percent_job = round(crosstab_response_job.div(crosstab_response_job.sum(0), axis = 1) * 100, 1)
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