Skip to content

Commit e6f14d0

Browse files
committed
squash a couple of errors
1 parent e4511f3 commit e6f14d0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: pandas/core/generic.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3375,8 +3375,9 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
33753375
limit=None, downcast=None, errors=None):
33763376
inplace = validate_bool_kwarg(inplace, 'inplace')
33773377

3378-
if value:
3379-
# fill values by column, not all at once, to respect dtypes.
3378+
# if a singular fill value is provided, validate it
3379+
if value is not None:
3380+
# fill values by column, not all at once, to respect dtypes
33803381
if not isinstance(value, dict) and isinstance(self, ABCDataFrame):
33813382
value = {col: value for col in self.columns}
33823383
try:

Diff for: pandas/core/internals.py

+3
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ def fillna(self, value, limit=None, inplace=False, downcast=None,
362362
""" fillna on the block with the value. If we fail, then convert to
363363
ObjectBlock and try again
364364
"""
365+
if not errors:
366+
errors = 'coerce'
367+
365368
inplace = validate_bool_kwarg(inplace, 'inplace')
366369

367370
if not self._can_hold_na:

0 commit comments

Comments
 (0)