<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to optimize and convert a Spark DataFrame to Arrow? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-optimize-and-convert-a-spark-dataframe-to-arrow/m-p/26052#M18177</link>
    <description>&lt;P&gt;Example use case: When connecting a sample Plotly Dash application to a large dataset, in order to test the performance, I need the file format to be in either hdf5 or arrow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to this doc:&amp;nbsp;&lt;A href="https://docs.databricks.com/spark/latest/spark-sql/spark-pandas.html" alt="https://docs.databricks.com/spark/latest/spark-sql/spark-pandas.html" target="_blank"&gt;Optimize conversion between PySpark and pandas DataFrames&lt;/A&gt;, it seems like you can convert between dataframes and Arrow objects by using Pandas as an intermediary,&amp;nbsp;but there are some limitations (e.g. it collects all records in the DataFrame to the driver and should be done on a small subset of the data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be accomplished without type conversion warnings and out-of-memory errors? &lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 16:51:14 GMT</pubDate>
    <dc:creator>User16776430979</dc:creator>
    <dc:date>2021-06-07T16:51:14Z</dc:date>
    <item>
      <title>How to optimize and convert a Spark DataFrame to Arrow?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-optimize-and-convert-a-spark-dataframe-to-arrow/m-p/26052#M18177</link>
      <description>&lt;P&gt;Example use case: When connecting a sample Plotly Dash application to a large dataset, in order to test the performance, I need the file format to be in either hdf5 or arrow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to this doc:&amp;nbsp;&lt;A href="https://docs.databricks.com/spark/latest/spark-sql/spark-pandas.html" alt="https://docs.databricks.com/spark/latest/spark-sql/spark-pandas.html" target="_blank"&gt;Optimize conversion between PySpark and pandas DataFrames&lt;/A&gt;, it seems like you can convert between dataframes and Arrow objects by using Pandas as an intermediary,&amp;nbsp;but there are some limitations (e.g. it collects all records in the DataFrame to the driver and should be done on a small subset of the data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be accomplished without type conversion warnings and out-of-memory errors? &lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 16:51:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-optimize-and-convert-a-spark-dataframe-to-arrow/m-p/26052#M18177</guid>
      <dc:creator>User16776430979</dc:creator>
      <dc:date>2021-06-07T16:51:14Z</dc:date>
    </item>
  </channel>
</rss>

