如何将 Great Expectations DataFrame 转换为 Apache Spark DataFrame

How to Convert Great Expectations DataFrame to Apache Spark DataFrame

以下代码会将 Apache Spark DataFrame 转换为 Great_Expectations DataFrame。如果我想将 Spark DataFrame spkDF 转换为 Great_Expectations DataFrame,我将执行以下操作:

ge_df = SparkDFDataset(spkDF)

谁能告诉我如何将 Great_Expectation 数据帧转换为 Spark 数据帧。

那么我需要做什么才能将新的 Great_Expectations 数据帧 ge_df 转换回 Spark DataFrame?

根据 official documentation,class SparkDFDataset 包含原始 pyspark 数据帧:

This class holds an attribute spark_df which is a spark.sql.DataFrame.

因此您应该可以通过以下方式访问它:

ge_df.spark_df