<?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: Incorrect results with df.query() in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28284#M20107</link>
    <description>&lt;P&gt;Hubert - I've found a workaround for this, so we can close the discussion.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2022 13:39:05 GMT</pubDate>
    <dc:creator>plynton</dc:creator>
    <dc:date>2022-10-18T13:39:05Z</dc:date>
    <item>
      <title>Incorrect results with df.query()</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28282#M20105</link>
      <description>&lt;P&gt;I have tried pulling a single row from a .csv using df.query()&lt;/P&gt;&lt;P&gt;However, the data being returned doesn't coincide with the data I'm expecting - it is pulling a different row.&amp;nbsp;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df = spark.read.option("header",True).csv(data_fldr + "config/CHRGConfig.csv")&lt;/P&gt;&lt;P&gt;df = df.toPandas()&lt;/P&gt;&lt;P&gt;hdrlist = list(df)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xstr = "VERSION == \"" + "STPP" + "\""&lt;/P&gt;&lt;P&gt;print(xstr)&lt;/P&gt;&lt;P&gt;planlist = df.query(xstr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for zz in planlist:&lt;/P&gt;&lt;P&gt;&amp;nbsp;#&lt;/P&gt;&lt;P&gt;&amp;nbsp;# I'm looking for non-null values&lt;/P&gt;&lt;P&gt;&amp;nbsp;#&lt;/P&gt;&lt;P&gt;&amp;nbsp;if not pd.isnull(df.loc[0,zz]):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;print(zz)&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 15:07:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28282#M20105</guid>
      <dc:creator>plynton</dc:creator>
      <dc:date>2022-10-08T15:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect results with df.query()</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28283#M20106</link>
      <description>&lt;P&gt;Can you include a few rows of your CSV (at least one shouldn't be pulled, and one should)?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 10:39:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28283#M20106</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-16T10:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect results with df.query()</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28284#M20107</link>
      <description>&lt;P&gt;Hubert - I've found a workaround for this, so we can close the discussion.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 13:39:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28284#M20107</guid>
      <dc:creator>plynton</dc:creator>
      <dc:date>2022-10-18T13:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect results with df.query()</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28285#M20108</link>
      <description>&lt;P&gt;Hi @Peter Ott​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does @Hubert Dudek​&amp;nbsp; response answer your question? If yes, would you be happy to &lt;B&gt;mark it as best &lt;/B&gt;so that other members can find the solution more quickly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 06:06:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-results-with-df-query/m-p/28285#M20108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-17T06:06:03Z</dc:date>
    </item>
  </channel>
</rss>

