-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
BugIO CSVread_csv, to_csvread_csv, to_csvPDEP missing valuesIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprintIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint
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
arr = pd.array([0, pd.NA])
ser = pd.Series(arr) / 0
ser[2] = 3
df = ser.to_frame("A")
text = df.to_csv()
rt = pd.read_csv(StringIO(text), dtype_backend="numpy_nullable")[["A"]]
>>> df.loc[0, "A"]
np.float64(nan)
>>> rt.loc[0, "A"]
<NA>
Issue Description
This is a consequence of the constructor casting NaNs to pd.NA, xref #32265
Expected Behavior
NA
Installed Versions
Replace this line with the output of pd.show_versions()
Metadata
Metadata
Assignees
Labels
BugIO CSVread_csv, to_csvread_csv, to_csvPDEP missing valuesIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprintIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint