<?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 Hi All, I need to extract rows of dates from a dataframe  based on list of  values(e.g. dates) located in a CSV file. Can anyone please help me? I have tried groupby function but am not able to get the expected result. Thanks in advance. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/hi-all-i-need-to-extract-rows-of-dates-from-a-dataframe-based-on/m-p/17085#M11138</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;my dataframe looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;df =
&lt;P&gt;Datecolumn2column3Machine1-jan-2020A2-jan-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;- 
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;18-jan-2020 &lt;/P&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;11-jan-2020 &lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;12-jan-2020&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;6-feb-2020C7-feb-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-C14-feb-2020C 
&lt;P&gt;Date details csv file looks like this&lt;/P&gt;
&lt;P&gt;D =&lt;/P&gt;
&lt;P&gt;MachineSelected DateA15-jan-2020C12-feb-2020 &lt;/P&gt;
&lt;P&gt;I need to pick date and machine from the csv file "D" and in dataframe "df" for that machine, i need to extract the last 3 rows from the 'selected date'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;So Outcome should be 
&lt;P&gt;Datecolumn2column3Machine13-jan-2020A14-jan-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;A15-jan-2020A10-feb-2020C11-feb-2020&lt;P&gt;&lt;/P&gt;C12-feb-2020C 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 18:55:03 GMT</pubDate>
    <dc:creator>SindhuG</dc:creator>
    <dc:date>2021-07-29T18:55:03Z</dc:date>
    <item>
      <title>Hi All, I need to extract rows of dates from a dataframe  based on list of  values(e.g. dates) located in a CSV file. Can anyone please help me? I have tried groupby function but am not able to get the expected result. Thanks in advance.</title>
      <link>https://community.databricks.com/t5/data-engineering/hi-all-i-need-to-extract-rows-of-dates-from-a-dataframe-based-on/m-p/17085#M11138</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;my dataframe looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;df =
&lt;P&gt;Datecolumn2column3Machine1-jan-2020A2-jan-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;- 
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;18-jan-2020 &lt;/P&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;11-jan-2020 &lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;12-jan-2020&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;6-feb-2020C7-feb-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-&lt;P&gt;&lt;/P&gt;-C14-feb-2020C 
&lt;P&gt;Date details csv file looks like this&lt;/P&gt;
&lt;P&gt;D =&lt;/P&gt;
&lt;P&gt;MachineSelected DateA15-jan-2020C12-feb-2020 &lt;/P&gt;
&lt;P&gt;I need to pick date and machine from the csv file "D" and in dataframe "df" for that machine, i need to extract the last 3 rows from the 'selected date'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;So Outcome should be 
&lt;P&gt;Datecolumn2column3Machine13-jan-2020A14-jan-2020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;A15-jan-2020A10-feb-2020C11-feb-2020&lt;P&gt;&lt;/P&gt;C12-feb-2020C 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 18:55:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/hi-all-i-need-to-extract-rows-of-dates-from-a-dataframe-based-on/m-p/17085#M11138</guid>
      <dc:creator>SindhuG</dc:creator>
      <dc:date>2021-07-29T18:55:03Z</dc:date>
    </item>
  </channel>
</rss>

