BUG: Index.fillna ignores 'downcast' (original) (raw)
Issue Description
def fillna(self, value=None, downcast=None):
value = self._require_scalar(value)
if self.hasnans:
result = self.putmask(self._isnan, value)
if downcast is None:
return Index._with_infer(result, name=self.name)
return self._view()
In the case with downcast not None and self.hasnans, we fall through to return self._view() and ignore result. We don't have any such cases in the test suite.
Expected Behavior
Not ignoring result or downcast.
I'd be OK with deprecating the keyword; i expect it is just there to match NDFrame.