建立行级 Expectations
在本练习中,您将练习在行级编写一些面向列的 Expectations。您将使用与视频中相同的 Shein 鞋履数据集。您可以在这里了解更多关于该数据集的信息。
Batch 已赋给名为 batch 的变量,并已加载 Shein 鞋履数据集。Great Expectations 和 pandas 分别可通过 gx 和 pd 使用。
本练习是课程的一部分
使用 Great Expectations 的数据质量入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Establish missingness Expectation
expectation = gx.expectations.____(
column="name"
)
# Run the Expectation
validation_results = batch.____(expect=expectation)
# Print the success status
print(validation_results.____)