title: Remove redundant timestamps from csv
body: <p>I have created a CSV file from the recording of different sensors using pandas DataFrame. The CSV file basically looks like this:</p>
  <p><a href="https://i.stack.imgur.com/sGXQ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sGXQ1.png" alt="what the csv file looks like, simplified" /></a></p>
  <p>I would like to get rid of the redundant timestamps and instead have all sensor entries that share a timestamp appear in the same row (for example x2 and x3 in the image).
  Also, the labels that share a timestamp are always identical, but would need to be reduced as well.</p>
  <p>So far, I've come across the <code>drop_duplicate()</code> function which only drops entire rows.</p>
  <p>Edit: here's a text version of the example above:</p>
  <pre><code>timestamp,sensor_a,sensor_b,sensor_c,label
  1,x1,,,0
  2,,x2,,0
  2,,,x3,0
  3,x4,,,1
  4,,,,1
  5,,x6,,1
  5,,,x7,1
  </code></pre>