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

Establish a Column Count Expectation

In the last video, we learned about the ExpectTableRowCountToEqual(value: int) Expectation for a table's row count. As we saw towards the end of the video, Great Expectations also has an Expectation called ExpectTableColumnCountToEqual(value: int) This class is the exact same, except it applies to the column count instead of the row count. In this exercise, you'll implement the class to create and validate a column count Expectation.

You'll be using the same Renewable Power Generation dataset we referenced in the video. You can learn more about the dataset here.

The dataset has already been loaded into a Batch, 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.


# Create table column count Expectation
expectation = gx.expectations.____(
	value=____
)
Kodu Düzenle ve Çalıştır