数据校验,轴的概念

时间:2019-06-19 20:57:32   收藏:0   阅读:142
import pandas as pd


def score_valication(row):
    try:
        assert 0 <= row.Score <= 100
    except:
        print(f#{row.ID}\tstudent {row.Name} has an invalid score {row.Score})


students = pd.read_excel(C:/Temp/Students.xlsx)
# print(students)
students.apply(score_valication, axis=1)

 

原文:https://www.cnblogs.com/inserence/p/11054442.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!