ข้อมูลสะอาดไม่ใช่ข้อมูลที่ไม่มีค่าว่าง แต่คือข้อมูลที่ผ่านการตัดสินใจอย่างมีเหตุผลว่าควรจัดการแต่ละปัญหาอย่างไร
ลำดับการตรวจสอบ
- ดู shape และ sample
- ตรวจชนิดข้อมูล
- สำรวจ missing values
- ตรวจ duplicate
- ทดสอบ business rules
profile.py
def profile(df):
return {
'shape': df.shape,
'missing': df.isna().sum().to_dict(),
'duplicates': int(df.duplicated().sum()),
}