Skip to content

Commit dbd6d5a

Browse files
code sample for pandas-dev#45603
1 parent ab9f0d7 commit dbd6d5a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bisect/45603.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# BUG: fillna downcast object to int even downcast=False/None #45603
2+
3+
import pandas as pd
4+
5+
print(pd.__version__)
6+
7+
df = pd.Series([1, 2, 3], dtype="object")
8+
result = df.fillna("", downcast=False) # will get int64 instead
9+
print(result)
10+
11+
assert result.dtype == object

0 commit comments

Comments
 (0)