简体   繁体   English

difference between pyspark.pandas.frame.DataFrame and pyspark.sql.dataframe.DataFrame and their conversion

[英]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.它们都具有可用于将一种转换为另一种的转换方法。

  • converting pyspark dataframe to pyspark-pandas dataframe can be done using to_pandas_on_spark将 pyspark dataframe 转换为 pyspark-pandas dataframe 可以使用to_pandas_on_spark
  • converting pyspark-pandas dataframe to pyspark dataframe can be done using to_spark可以使用 to_spark 将 pyspark-pandas dataframe 转换为 pyspark to_spark

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 pyspark.pandas.frame.DataFrame 的饼图 - Pie chart for pyspark.pandas.frame.DataFrame Pyspark:依靠 pyspark.sql.dataframe.DataFrame 需要很长时间 - Pyspark: count on pyspark.sql.dataframe.DataFrame takes long time 将pyspark.sql.dataframe.DataFrame类型转换为Dictionary - Convert pyspark.sql.dataframe.DataFrame type Dataframe to Dictionary 如何在不使用 pandas on spark API 的情况下为 pyspark.sql.dataframe.DataFrame 编写这个 pandas 逻辑? - How to write this pandas logic for pyspark.sql.dataframe.DataFrame without using pandas on spark API? 写一个pyspark.sql.dataframe.DataFrame不丢失信息 - Write a pyspark.sql.dataframe.DataFrame without losing information Pyspark:如何从 pyspark.sql.dataframe.DataFrame 中选择唯一的 ID 数据? - Pyspark: how to select unique ID data from a pyspark.sql.dataframe.DataFrame? Pyspark:如何将在线.gz日志文件加载到pyspark.sql.dataframe.DataFrame中 - Pyspark: how to load online .gz log file into pyspark.sql.dataframe.DataFrame 如何将pyspark.sql.dataframe.DataFrame转换回databricks笔记本中的sql表 - How can I convert a pyspark.sql.dataframe.DataFrame back to a sql table in databricks notebook 尝试在 Databricks 环境中合并或连接两个 pyspark.sql.dataframe.DataFrame - Trying to Merge or Concat two pyspark.sql.dataframe.DataFrame in Databricks Environment Pyspark Dataframe 中的日期转换 - Date conversion in Pyspark Dataframe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM