← 返回 roblox 的题目列表Data Filtering, Analysis, Cleaning, and Salary Prediction with Pandas
类型:online_judge
roblox
Please use Python and Pandas for data processing. Complete the following tasks:
Data Querying and Retrieval: Use Pandas to filter important columns and rows from a given dataset.
The dataset contains the columns: id, name, age, salary. Filter out people with age greater than 30 and salary greater than 50000.
Exploratory Data Analysis: Calculate statistical information such as mean, median, and standard deviation for the dataset.
Output the mean, median, and standard deviation of the salary in the dataset.
Data Cleaning and Preprocessing: Handle missing values and convert data types.
Handle missing age data and convert salary column to integer type.
Machine Learning and Predictive Modeling: Use existing data to train a simple linear regression model to predict salary.
Use age as the independent variable to predict salary and output the model's coefficient and intercept.
Example
Input
{'id': [1, 2, 3, 4], 'name': ['Alice', 'Bob', 'Charlie', 'David'], 'age': [34, 29, None, 40], 'salary': [70000, 48000, 52000, None]}