[英]difference between pyspark.pandas.frame.DataFrame and pyspark.sql.dataframe.DataFrame and their conversion
I could not find any detailed documentation on this point, so what is the difference between a pyspark.pandas.frame.DataFrame
and pyspark.sql.dataframe.DataFrame
, and where to find the documentation of their methods? I could not find any detailed documentation on this point, so what is the difference between a pyspark.pandas.frame.DataFrame
and pyspark.sql.dataframe.DataFrame
, and where to find the documentation of their methods?
Also how to cast, or convert one into the other and vice versa?还有如何投射,或将一个转换为另一个,反之亦然? Is it always seamless to convert them or some data types are not recognised?转换它们是否总是无缝的,或者某些数据类型无法识别?
here is the doc for pyspark-pandas (AKA pandas API on pyspark) which generates (or uses) the pyspark.pandas.DataFrame
. here is the doc for pyspark-pandas (AKA pandas API on pyspark) which generates (or uses) the pyspark.pandas.DataFrame
. You can look through the spark doc for its native dataframe methods.您可以查看spark 文档以了解其原生 dataframe 方法。
Both of them have conversion methods that can be used to convert one to other.它们都具有可用于将一种转换为另一种的转换方法。
to_pandas_on_spark
将 pyspark dataframe 转换为 pyspark-pandas dataframe 可以使用to_pandas_on_spark
to_spark
可以使用 to_spark 将 pyspark-pandas dataframe 转换为 pyspark to_spark
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.