以下代码会将 Apache Spark DataFrame 转换为 Great_Expectations DataFrame。如果我想将 Spark DataFrame spkDF
转换为 Great_Expectations DataFrame,我将执行以下操作:
ge_df = SparkDFDataset(spkDF)
有人可以告诉我如何将 Great_Expectation 数据帧转换为 Spark DataFrame。
那么我需要做什么才能将新的 Great_Expectations 数据帧 ge_df
转换回 Spark DataFrame?
最佳答案
根据official documentation ,类 SparkDFDataset
保存原始 pyspark 数据帧:
This class holds an attribute
spark_df
which is a spark.sql.DataFrame.
所以你应该能够通过以下方式访问它:
ge_df.spark_df
关于apache-spark - 如何将 Great Expectations DataFrame 转换为 Apache Spark DataFrame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69929048/