Temel Sütun Beklentileri

Great Expectations ile Veri Kalitesine Giriş

Davina Moossazadeh

Data Scientist

Shein Ayakkabı Veri Kümesi

Kaggle'ın Shein Ayakkabı Veri Kümesi'nin pandas'a yüklenmiş ilk beş satırı. DataFrame şu sütunlara sahip: "name", "link", "price_usd", "mark_price_usd", "star_rating", "colour", "seller_name", "review_count", "sku_id" ve "hero_image".

1 https://www.kaggle.com/datasets/atharvataras/shein-footwear-dataset
Great Expectations ile Veri Kalitesine Giriş

Satır düzeyi beklentiler

  • Satır düzeyi beklentiler her satıra ayrı uygulanır
    • koşul tüm satırlar için sağlandığında başarılı olur
Great Expectations ile Veri Kalitesine Giriş

Satır düzeyi beklentiler

Eksiklik beklentisi

gx.expectations.ExpectColumnValuesToNotBeNull(
    column="colour"
)

Tür beklentisi

gx.expectations.ExpectColumnValuesToBeOfType(
    column="review_count", type_="str"
)
Great Expectations ile Veri Kalitesine Giriş

Toplam düzey beklentileri: ayrık değerler

Ayrık değerler beklentisi

gx.expectations.ExpectColumnDistinctValuesToEqualSet(
    column="seller_name", value_set={"Womens Shoes"}
)
Great Expectations ile Veri Kalitesine Giriş

Toplam düzey beklentileri: benzersiz değer sayısı

Benzersiz değer sayısı beklentisi

gx.expectations.ExpectColumnUniqueValueCountToBeBetween(
    column="review_count", min_value=5, max_value=101
)
Great Expectations ile Veri Kalitesine Giriş

Toplam düzey beklentileri: benzersizlik

Benzersizlik beklentisi

gx.expectations.ExpectColumnValuesToBeUnique(
    column="sku_id"
)
Great Expectations ile Veri Kalitesine Giriş

Toplam düzey beklentileri: mod

Mod beklentisi

gx.expectations.ExpectColumnMostCommonValueToBeInSet(
    column="colour", value_set={"Khaki", "Purple", "Grey"}
)
Great Expectations ile Veri Kalitesine Giriş

Hızlı başvuru

Satır düzeyi beklentileri:

ExpectColumnValuesToNotBeNull(
    column: str
)
ExpectColumnValuesToBeOfType(
    column: str, type_: str
)

Toplam düzey beklentileri:

ExpectColumnDistinctValuesToEqualSet(
    column: str, value_set: set
)
ExpectColumnUniqueValueCountToBeBetween(
    column: str, 
    min_value: int, max_value: int
)
ExpectColumnValuesToBeUnique(column: str)
ExpectColumnMostCommonValueToBeInSet(
    column: str, value_set: set
)
Great Expectations ile Veri Kalitesine Giriş

Hadi pratik yapalım!

Great Expectations ile Veri Kalitesine Giriş

Preparing Video For Download...