Open
Description
-
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 master branch of pandas.
Reproducible Example
ls = [
1234567890123456789,
np.nan,
1234567890123337789,
]
pd.Series(ls, dtype=np.float128)
Issue Description
When a series is created from a list that contains np.nan values, its type is float.
And if the list contains 19-digit integers the precision of the last few digits is lost.
A similar issue seems to have been fixed in numpy a couple of years ago: numpy/numpy#9006.
Would you please suggest any workaround until this is resolved? Having a series with integer values and nans would work for me in this particular case. Thank you in advance.
Expected Behavior
The expected behaviour would be to keep the precision exactly.