title: Filling missing values using forward and backward fill in pandas dataframe (ffill and bfill)
body: <p>Beginner with panda dataframes. I have this data set below with missing values for column A and B (Test.csv):</p>
  
  <pre><code>DateTime              A             B
  01-01-2017 03:27        
  01-01-2017 03:28        
  01-01-2017 03:29    0.18127718  -0.178835737
  01-01-2017 03:30    0.186923018 -0.183260853
  01-01-2017 03:31        
  01-01-2017 03:32        
  01-01-2017 03:33    0.18127718  -0.178835737
  </code></pre>
  
  <p>I can use this code to fill in values using forward propagation, but this only fills in for 03:31 and 03:32, and not 03:27 and 03:28.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.read_csv('test.csv', index_col = 0)
  data = df.fillna(method='ffill')
  ndata = data.to_csv('test1.csv')
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>   DateTime              A             B
      01-01-2017 03:27        
      01-01-2017 03:28        
      01-01-2017 03:29    0.18127718  -0.178835737
      01-01-2017 03:30    0.186923018 -0.183260853
      01-01-2017 03:31    0.186923018 -0.183260853
      01-01-2017 03:32    0.186923018 -0.183260853
      01-01-2017 03:33    0.18127718  -0.178835737
  </code></pre>
  
  <p>How could I include the 'Bfill' to fill in the missing values for 03:27 and 03:28 using the backfil?</p>