Skip to content

Commit 7b9d9cf

Browse files
committed
BUG: Remove infered dtype block since it is redundant
1 parent 94a0730 commit 7b9d9cf

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pandas/core/construction.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,7 @@ def sanitize_masked_array(data: ma.MaskedArray) -> np.ndarray:
520520
and is_float_dtype(data.dtype)
521521
and len(data) > 0
522522
):
523-
inferred_type = lib.infer_dtype(original, skipna=True)
524-
if (
525-
inferred_type not in ["floating", "mixed-integer-float"]
526-
and not mask.any()
527-
):
528-
data = ma.asarray(original, dtype)
529-
else:
530-
data = ma.asarray(original, "object")
523+
data = ma.asarray(original, "object")
531524
data[mask] = fill_value
532525
else:
533526
data = data.copy()

0 commit comments

Comments
 (0)