Question32 The Pandas DataFrame employees is displayed as below. [table] Name | Department | Salary | Location John | HR | 60000 | Sydney Emma | IT | NaN | Melbourne Liam | Finance | 55000 | None Olivia | IT | 70000 | Sydney Noah | Finance | 65000 | None Ava | HR | 62000 | Brisbane [/table] Which option(s) can replace missing values in the Location column with the most frequently occurring location? Select one or more alternatives: [table] [/table]Select one or more alternatives: employees['Location'].fillna('None') employees['Location'].fillna(employees['Location'].mode()[0], inplace=True) employees['Location'].replace(np.nan, 'Melbourne') employees['Location'].fillna('Sydney', inplace=True) ResetMaximum marks: 3 Flag question undefined多项选择题
A
employees['Location'].fillna('None')
B
employees['Location'].fillna(employees['Location'].mode()[0], inplace=True)
C
employees['Location'].replace(np.nan, 'Melbourne')
D
employees['Location'].fillna('Sydney', inplace=True)
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
Which of the following is NOT a recommended method to handle missing data in preprocessing?
Some image features are missing more often for lower-quality scans. What question matters most before imputation?
There are missing data in the heart_disease dataset as shown in the table above. Provide the code to show how to handle the missing data. Explain your approach.
Project A has a required return on 9.2 percent and cash flows of −$87,000, $32,600, $35,900, and $43,400 for Years 0 to 3, respectively. Project B has a required return of 12.7 percent and cash flows of −$85,000, $14,700, $21,200, and $89,800 for Years 0 to 3, respectively. Which project(s) should you accept based on net present value if the projects are mutually exclusive?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!