Closed
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
# gets upcast to object
df = pd.DataFrame({"a": [1, 2, 3]}, dtype="Int64")
df.loc[4] = pd.NA
Issue Description
xref #32346 (comment), #47214
Expected Behavior
In [1]: df = pd.DataFrame({"a": [1, 2, 3]}, dtype="Int64")
...: df.loc[4] = pd.NA
In [2]: df
Out[2]:
a
0 1
1 2
2 3
4
In [3]: df.dtypes
Out[3]:
a Int64
dtype: object
In [4]: pd.version
Out[4]: '1.3.5'
Installed Versions
.