title: Farword fill based on other column with group by
body: <p>I am new to python and i have struct at forword fill.
  i have data frame (df_input) i need to forword fill d1 column up to the value in d2 column group by Name &amp; type columns</p>
  <pre><code>import pandas as pd
  data_input = {'Name':['Renault', 'Renault', 'Renault', 'Renault','Renault','Renault','Renault','Renault','Renault'],
          'type':['Duster', 'Duster', 'Duster', 'Duster','Duster','Triber','Triber','Triber','Triber'],
           'd1':['nan','10','nan','nan','nan','nan','20','nan','nan'],
           'd2':['nan','nan','nan','200','nan','nan','nan','nan','200']}  
  
  df_input = pd.DataFrame(data_input)
  
  
  data_out = {'Name':['Renault', 'Renault', 'Renault', 'Renault','Renault','Renault','Renault','Renault','Renault'],
          'type':['Duster', 'Duster', 'Duster', 'Duster','Duster','Triber','Triber','Triber','Triber'],
           'd1':['nan','10','nan','nan','nan','nan','20','nan','nan'],
           'd2':['nan','nan','nan','200','nan','nan','nan','nan','200'],
           'Out_col':['nan','10','10','10','nan','nan','20','20','20']} 
  
  df_out = pd.DataFrame(data_out)
  </code></pre>
  <p>I have tried the following</p>
  <pre><code>df_out['Out_col']  = df_out.groupby([&quot;Name&quot;,&quot;type&quot;])[&quot;d1&quot;].ffill()
  </code></pre>
  <p>Thanks in advance!</p>