BUG: Cannot convert pd.NA to Timestamp #45481
Labels
Bug
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
Needs Discussion
Requires discussion from core team before further action
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
Issue Description
pd.Timestamp
constructor fails to handlepd.NA
properly on the latest version and main branch (1.5.0.dev0+128.g91d3f0b246
).This works fine (on both main branch and 1.3.5) using
pd.to_datetime
(seems to have been fixed in #32213):Expected Behavior
I expect the
Timestamp
constructor to handlepd.NA
the same way as it handlesNone
andnp.nan
, i.e.pd.Timestamp(pd.NA)
should returnNaT
.Installed Versions
The text was updated successfully, but these errors were encountered: