We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cff4f36 commit df59a2cCopy full SHA for df59a2c
pandas/core/internals/managers.py
@@ -1800,6 +1800,8 @@ def as_array(
1800
arr = np.asarray(blk.values, dtype=dtype)
1801
else:
1802
arr = np.array(blk.values, dtype=dtype, copy=copy)
1803
+ if passed_nan and blk.dtype.kind in ["m", "M"]:
1804
+ arr[isna(blk.values)] = na_value
1805
1806
if not copy:
1807
arr = arr.view()
@@ -1865,6 +1867,8 @@ def _interleave(
1865
1867
1866
1868
arr = blk.get_values(dtype)
1869
result[rl.indexer] = arr
1870
+ if na_value is not lib.no_default and blk.dtype.kind in ["m", "M"]:
1871
+ result[rl.indexer][isna(arr)] = na_value
1872
itemmask[rl.indexer] = 1
1873
1874
if not itemmask.all():
0 commit comments