def fillna(self, value, limit=None, inplace=False, downcast=None):
inplace = validate_bool_kwarg(inplace, '<STR_LIT>')<EOL>if not self._can_hold_na:<EOL><INDENT>if inplace:<EOL><INDENT>return self<EOL><DEDENT>else:<EOL><INDENT>return self.copy()<EOL><DEDENT><DEDENT>mask = isna(self.values)<EOL>if limit is not None:<EOL><INDENT>if not is_integer(limit):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if limit < <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if self.ndim > <NUM_LIT:2>:<EOL><INDENT>raise NotImplementedError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>mask[mask.cumsum(self.ndim - <NUM_LIT:1>) > limit] = False<EOL><DEDENT>try:<EOL><INDENT>values, _ = self._try_coerce_args(self.values, value)<EOL>blocks = self.putmask(mask, value, inplace=inplace)<EOL>blocks = [b.make_block(values=self._try_coerce_result(b.values))<EOL>for b in blocks]<EOL>return self._maybe_downcast(blocks, downcast)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>if not mask.any():<EOL><INDENT>return self if inplace else self.copy()<EOL><DEDENT>def f(m, v, i):<EOL><INDENT>block = self.coerce_to_target_dtype(value)<EOL>if i is not None:<EOL><INDENT>block = block.getitem_block(slice(i, i + <NUM_LIT:1>))<EOL><DEDENT>return block.fillna(value,<EOL>limit=limit,<EOL>inplace=inplace,<EOL>downcast=None)<EOL><DEDENT>return self.split_and_operate(mask, f, inplace)<EOL><DEDENT>
fillna on the block with the value. If we fail, then convert to
        ObjectBlock and try again