1.打印前5行数据,发现存在‘NAN’ 2.如果这个问题不处理,后续要到操作列时,会报错误‘'DataFrame' object is not callable’
思路: 跳过有NAN的行
def to_split(): xl = pd.ExcelFile("d:/work/加班统计/11月份工时表.xlsx") df = xl.parse(xl.sheet_names[1], skiprows=2) print(df.head(5))
实现效果: