studf = pd.read_excel("datas/student_excel/student_excel.xlsx",skiprows=2)
studf.dropna(axis="columns",how='all',inplace=True)
studf.dropna(axis="index",how='all',inplace=True)
studf.loc[:,'分数'] = studf['分数'].fillna(0)
studf.loc[:,'姓名'] = studf['姓名'].fillna(method='ffill')
studf.to_excel("datas/student_excel/student_excel_clean.xlsx",index=False)
转载请注明原文地址:https://blackberry.8miu.com/read-32595.html