<?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 Re: I cannot see the output when using pandas_api() on spark dataframe in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117126#M45430</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/162644"&gt;@kaushalshelat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, `test.show()` should've thrown an error as test is the pandas dataframe now.&lt;/P&gt;&lt;P&gt;`.show()` is a spark df method and wouldn't work with pandas.&lt;BR /&gt;&lt;BR /&gt;If you want to see a subset of the data try `.head()` or `.tail(n)` rather then `.show()`.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2025 10:11:38 GMT</pubDate>
    <dc:creator>RiyazAliM</dc:creator>
    <dc:date>2025-04-30T10:11:38Z</dc:date>
    <item>
      <title>I cannot see the output when using pandas_api() on spark dataframe</title>
      <link>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117011#M45410</link>
      <description>&lt;P&gt;Hi all, I started learning spark and databricks recently along with python. while running below line of code it did not throw any error and seem to run ok but didn't show me output either.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;test=cust_an_inc1.pandas_api()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;test.show()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;where cust_an_inc1 is spark dataframe.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The message i get is as below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;EM&gt;'/databricks/python/lib/python3.11/site-packages/pyspark/pandas/utils.py:1035: PandasAPIOnSparkAdviceWarning: The config 'spark.sql.ansi.enabled' is set to True. This can cause unexpected behavior from pandas API on Spark since pandas API on Spark follows the behavior of pandas, not SQL. warnings.warn(message, PandasAPIOnSparkAdviceWarning)'&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;so no error but no output either.&lt;/DIV&gt;&lt;DIV class=""&gt;Can anyone know issue with this please. Thanks in advance.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 16:44:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117011#M45410</guid>
      <dc:creator>kaushalshelat</dc:creator>
      <dc:date>2025-04-29T16:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot see the output when using pandas_api() on spark dataframe</title>
      <link>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117052#M45416</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/162644"&gt;@kaushalshelat&lt;/a&gt;,&amp;nbsp;I don't think you need to call '.show()' in order to print the DF out. You should just be able to print by writing the df variable name.&lt;/P&gt;&lt;P&gt;&lt;A href="https://spark.apache.org/docs/latest/api/python/getting_started/quickstart_ps.html" target="_self"&gt;Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pandas_api.png" style="width: 200px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16316iF223A5B75D524A2A/image-size/small?v=v2&amp;amp;px=200" role="button" title="pandas_api.png" alt="pandas_api.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 01:00:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117052#M45416</guid>
      <dc:creator>samshifflett46</dc:creator>
      <dc:date>2025-04-30T01:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot see the output when using pandas_api() on spark dataframe</title>
      <link>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117126#M45430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/162644"&gt;@kaushalshelat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, `test.show()` should've thrown an error as test is the pandas dataframe now.&lt;/P&gt;&lt;P&gt;`.show()` is a spark df method and wouldn't work with pandas.&lt;BR /&gt;&lt;BR /&gt;If you want to see a subset of the data try `.head()` or `.tail(n)` rather then `.show()`.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 10:11:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-cannot-see-the-output-when-using-pandas-api-on-spark-dataframe/m-p/117126#M45430</guid>
      <dc:creator>RiyazAliM</dc:creator>
      <dc:date>2025-04-30T10:11:38Z</dc:date>
    </item>
  </channel>
</rss>

