code: def _bfill(arr, n=None, axis=-1):
      '''inverse of ffill'''
      import bottleneck as bn
  
      arr = np.flip(arr, axis=axis)
  
      # fill
      arr = bn.push(arr, axis=axis, n=n)
  
      # reverse back to original
      return np.flip(arr, axis=axisf _bfill(arr, n=None, axis=-1):
      '''inverse of ffill'''
      import bottleneck as bn
  
      arr = np.flip(arr, axis=axis)
  
      # fill
      arr = bn.push(arr, axis=axis, n=n)
  
      # reverse back to original
      return np.flip(arr, axis=axis)
docs: inverse of ffill