<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pawan Kumar</title>
    <description>The latest articles on DEV Community by Pawan Kumar (@connecttopawan).</description>
    <link>https://dev.to/connecttopawan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F662371%2Fe3da4950-5781-42ae-bb97-1d3bd0ad1230.jpeg</url>
      <title>DEV Community: Pawan Kumar</title>
      <link>https://dev.to/connecttopawan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/connecttopawan"/>
    <language>en</language>
    <item>
      <title>Spark : Replace collect()[][]</title>
      <dc:creator>Pawan Kumar</dc:creator>
      <pubDate>Tue, 06 Jul 2021 09:40:41 +0000</pubDate>
      <link>https://dev.to/connecttopawan/spark-replace-collect-d6e</link>
      <guid>https://dev.to/connecttopawan/spark-replace-collect-d6e</guid>
      <description>&lt;p&gt;I am having code as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new_df=spark.sql("Select col1,col2 from table1 where id=2").collect()[0][0]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have tried toLocalIterator() but getting message that is not subscriptable.&lt;br&gt;
Please suggest a better way to replace collect()[0][0].&lt;/p&gt;

</description>
      <category>spark</category>
    </item>
  </channel>
</rss>
