title: Group by and fill missing datetime values with duplicates
body: <p>This question comes from this one: <a href="https://stackoverflow.com/questions/59352953/group-by-and-fill-missing-datetime-values">Group by and fill missing datetime values</a></p>
  
  <p>What I'm just trying is to group a Pandas Dataframe by contract, check if there are duplicated datetime values and fill this ones. If there are duplicates, there will be a total of 25 hours, and if not, 24.</p>
  
  <p>My input is this:</p>
  
  <pre><code>contract         datetime             value1          value2
     x       2019-01-01 00:00:00          50              60
     x       2019-01-01 02:00:00          30              60
     x       2019-01-01 02:00:00          70              80
     x       2019-01-01 03:00:00          70              80
     y       2019-01-01 00:00:00          30              100
  </code></pre>
  
  <p>With this Dataframe my output should be something like this:</p>
  
  <pre><code>contract         date              value1                     value2
     x           2019-01-01    [50,NaN,30,70,70,NaN,Nan...]    [60, NaN, Nan...]
     y           2019-01-01    [30, NaN, Nan...]               [100, NaN, NaN...]
  </code></pre>
  
  <p>Thank you very much.</p>