Skip to content

Commit 14327a7

Browse files
committed
try try again
1 parent b2eef2d commit 14327a7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/core/internals.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,14 @@ def fillna(self, value, limit=None, inplace=False, downcast=None,
384384

385385
# fillna, but if we cannot coerce, then try again as an ObjectBlock
386386
try:
387+
print("_try_coerce_args: {}".format(value))
387388
values, _, _, _ = self._try_coerce_args(self.values, value)
389+
print("putmask")
388390
blocks = self.putmask(mask, value, inplace=inplace)
391+
print("coerce")
389392
blocks = [b.make_block(values=self._try_coerce_result(b.values))
390393
for b in blocks]
394+
print("downcast")
391395
return self._maybe_downcast(blocks, downcast)
392396
except (TypeError, ValueError):
393397

@@ -397,16 +401,11 @@ def fillna(self, value, limit=None, inplace=False, downcast=None,
397401

398402
# operate column-by-column
399403
def f(m, v, i):
400-
print("value: {}".format(value))
401-
print("block: {}".format(self))
402-
# try again with a compatible block
403404
block = self.coerce_to_target_dtype(value)
404-
print("coerced block: {}".format(block))
405-
406405
return block.fillna(value,
407406
limit=limit,
408407
inplace=inplace,
409-
downcast=False)
408+
downcast=None)
410409

411410
return self.split_and_operate(mask, f, inplace)
412411

0 commit comments

Comments
 (0)