title: pandas dataframe groupby and fill with first row values
body: <p>I have a df like this,</p>
  <pre><code>df = pd.DataFrame({
      &quot;Name&quot; : [&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;E&quot;,&quot;F&quot;,&quot;G&quot;],
      &quot;part number&quot; : [&quot;1&quot;,&quot;3&quot;,&quot;2&quot;,&quot;1&quot;,&quot;5&quot;,&quot;1&quot;,&quot;2&quot;],
      &quot;detail1&quot; : [&quot;A&quot;,&quot;C&quot;,&quot;B&quot;,&quot;B&quot;,&quot;E&quot;,&quot;E&quot;,&quot;E&quot;],
      &quot;detail2&quot; : [&quot;one&quot;,&quot;three&quot;,&quot;two&quot;,&quot;two&quot;,&quot;five&quot;,&quot;five&quot;,&quot;five&quot;]
  })
  
  
  df
  Name    part number detail1 detail2
  A           1           A   one
  B           3           C   three
  C           2           B   two
  D           1           B   two
  E           5           E   five
  F           1           E   five
  G           2           E   five
  </code></pre>
  <p>I would like to groupby Part Number and fill detail1 and detail2 with first row values.</p>
  <p>My expected output,</p>
  <pre><code>Name    part number detail1 detail2
  A       1           A       one
  B       3           C       three
  C       2           B       two
  D       1           A       one
  E       5           E       five
  F       1           A       one
  G       2           B       two
  </code></pre>
  <p>I tried, <code>df.groupby(&quot;part number&quot;)[[&quot;detail1&quot;,&quot;detail2&quot;]].first()</code> but not giving the expected output, please help.</p>