Skip to content

Commit a1a39e1

Browse files
committed
fixes for pandas-dev#16155 and pandas-dev#16156 (need testing)
1 parent 110ff7a commit a1a39e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/generic.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3449,7 +3449,8 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
34493449
# if a singular fill value is provided, validate it
34503450
if value is not None:
34513451
# fill values by column, not all at once, to respect dtypes
3452-
if not isinstance(value, dict) and isinstance(self, ABCDataFrame):
3452+
if not isinstance(value, (dict, ABCSeries)) and \
3453+
isinstance(self, ABCDataFrame):
34533454
value = {col: value for col in self.columns}
34543455
try:
34553456
missing.validate_fill_value(self, value)
@@ -3544,7 +3545,7 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
35443545
obj = result[k]
35453546
obj.fillna(v, limit=limit, inplace=True,
35463547
downcast=downcast, errors=errors)
3547-
return result
3548+
return None if inplace else result
35483549
elif not is_list_like(value):
35493550
new_data = self._data.fillna(value=value, limit=limit,
35503551
inplace=inplace,

0 commit comments

Comments
 (0)