BUG: converting null timedelta to int with astype() changes NaT to -9223372036854775808 #59711
Open
2 of 3 tasks
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
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
astype(int)
converts missing values in a timedelta series to -9223372036854775808.Expected Behavior
should get
pd.DataFrame([1, None])
as the result.Installed Versions
The text was updated successfully, but these errors were encountered: