BaşlayınÜcretsiz Başlayın

Write up a Conditional Expectation

Taking a look at the Shein dataset, you can probably come up with a few Conditional Expectations. One such Expectation could be that the star_rating of a product should be 0.0 if the product has no reviews. Let's practice establishing this Conditional Expectation.

A Batch connected to the Shein Footwear dataset has already been created and assigned to the variable batch. Great Expectations and pandas are available as gx and pd, respectively.

Bu egzersiz

Introduction to Data Quality with Great Expectations

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Establish Conditional Expectation
expectation = gx.expectations.ExpectColumnValuesToBeInSet(
    column='____',
    value_set={____},
    condition_parser='pandas',
    row_condition='____==0',
)
Kodu Düzenle ve Çalıştır