code: def fillna(self, value=None, method=None, limit=None):
          
          from pandas.api.types import is_array_like
          from pandas.util._validators import validate_fillna_kwargs
          from pandas.core.missing import pad_1d, backfill_1d
  
          value, method = validate_fillna_kwargs(value, method)
  
          mask = self.isna()
  
          if is_array_like(value):
              if len(value) != len(self):
                  raise ValueError("Length of 'value' does not match. Got ({}) "
                                   " expected {}".format(len(value), len(self)))
              value = value[mask]
  
          if mask.any():
              if method is not None:
                  func = pad_1d if method == 'pad' else backfill_1d
                  new_values = func(self.astype(object), limit=limit,
                                    mask=mask)
                  new_values = self._from_sequence(new_values, dtype=self.dtype)
              else:
                  # fill with value
                  new_values = self.copy()
                  new_values[mask] = value
          else:
              new_values = self.copy()
          return new_values
docs: Fill NA/NaN values using the specified method.
  
          Parameters
          ----------
          value : scalar, array-like
              If a scalar value is passed it is used to fill all missing values.
              Alternatively, an array-like 'value' can be given. It's expected
              that the array-like have the same length as 'self'.
          method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None
              Method to use for filling holes in reindexed Series
              pad / ffill: propagate last valid observation forward to next valid
              backfill / bfill: use NEXT valid observation to fill gap
          limit : int, default None
              If method is specified, this is the maximum number of consecutive
              NaN values to forward/backward fill. In other words, if there is
              a gap with more than this number of consecutive NaNs, it will only
              be partially filled. If method is not specified, this is the
              maximum number of entries along the entire axis where NaNs will be
              filled.
  
          Returns
          -------
          filled : ExtensionArray with NA/NaN filled