title: Is there a way to flatten a DF/CSV if the time for rows is the same
body: <p>I would like to flatten the DF so that what is currently ~8+ (depending) rows, into 1 row as the time associated is the same. I only want to overwrite <code>NaN</code> cells.</p>
  <p>I'm reading the data in from a premade CSV.</p>
  <pre><code>
      try:  
          csv = pd.read_csv(csv_path,usecols=lambda c: c in {&quot;Time&quot;,&quot;Num&quot;,&quot;MyCols...&quot;})
      except ValueError:  
          print(&quot;No Tracking Data&quot;)  
          return  
      csv = csv.dropna(thresh=2)  
  
  </code></pre>
  <p>This returns a csv of ~20K rows at least.</p>
  <p>Current format</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>index</th>
  <th>Time</th>
  <th>Num</th>
  <th>sts</th>
  <th>fatal</th>
  <th>proc</th>
  <th>NG</th>
  <th>Freq</th>
  <th>Ax</th>
  <th>Ay</th>
  <th>..</th>
  <th>..</th>
  <th>..</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>06:50</td>
  <td>0</td>
  <td>0x0000</td>
  <td>0x0000</td>
  <td>59</td>
  <td>0</td>
  <td>6000</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  </tr>
  <tr>
  <td>2</td>
  <td>06:50</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>1201</td>
  <td>1957</td>
  <td>1283</td>
  <td>1315</td>
  <td>979</td>
  </tr>
  <tr>
  <td>3</td>
  <td>06:50</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  </tr>
  <tr>
  <td>4</td>
  <td>06:50</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  <td>--</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Desired format</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>index</th>
  <th>Time</th>
  <th>Num</th>
  <th>sts</th>
  <th>fatal</th>
  <th>proc</th>
  <th>NG</th>
  <th>Freq</th>
  <th>Ax</th>
  <th>Ay</th>
  <th>..</th>
  <th>..</th>
  <th>..</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>06:50</td>
  <td>0</td>
  <td>0x0000</td>
  <td>0x0000</td>
  <td>59</td>
  <td>0</td>
  <td>6000</td>
  <td>1201</td>
  <td>1957</td>
  <td>1283</td>
  <td>1315</td>
  <td>979</td>
  </tr>
  <tr>
  <td>8</td>
  <td>06:51</td>
  <td>0</td>
  <td>0x0000</td>
  <td>0x0000</td>
  <td>59</td>
  <td>0</td>
  <td>6000</td>
  <td>1400</td>
  <td>1483</td>
  <td>1260</td>
  <td>1304</td>
  <td>965</td>
  </tr>
  <tr>
  <td>16</td>
  <td>06:52</td>
  <td>0</td>
  <td>0x0000</td>
  <td>0x0000</td>
  <td>59</td>
  <td>0</td>
  <td>6000</td>
  <td>1501</td>
  <td>1827</td>
  <td>1345</td>
  <td>1340</td>
  <td>982</td>
  </tr>
  <tr>
  <td>24</td>
  <td>06:53</td>
  <td>0</td>
  <td>0x0000</td>
  <td>0x0000</td>
  <td>59</td>
  <td>0</td>
  <td>6000</td>
  <td>1401</td>
  <td>1462</td>
  <td>1239</td>
  <td>1535</td>
  <td>990</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>v:</p>
  <p><img src="https://i.stack.imgur.com/Qrbd1.png" alt="CSV Example" /></p>
  <p>Expected Output:</p>
  <p><img src="https://i.stack.imgur.com/eKESE.png" alt="Expected Output" /></p>