Excel VS Python 第二期——缺失值处理
知识点3:检查缺失值import pandas as pd #载入pandas库data = pd.read_excel('C:/Users/dell-pc/Desktop/data.xlsx') #读取Excel文件数据data.head(5) #显示前5行数据data.shape[0] #显示数据集的行数data.isnull().sum() #查看各列数据的缺失情况知识点4:删除缺失值data.dropna(how = "any", inplace = True)