第1关:引言-根深之树不怯风折,泉深之水不会涸竭
第2关:数据清理-查漏补缺
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def student():
train = pd.read_csv('Task1/diabetes_null.csv', na_values=['#NAME?'])
train['Insulin'] = train['Insulin'].fillna(100)
train['SkinThickness'] = train['SkinThickness'].fillna(train['SkinThickness'].median())
train['BloodPressure'] = train['BloodPressure'].fillna(train['BloodPressure'].median())
train['BMI'] = train['BMI'].fillna(train['BMI'].mean())
train['Glucose'] = train['Glucose'].fillna(train['Glucose'].mean())
#********* Begin *********#
train.sort_values(by='Age', ascending=False)[:1]
t