ENH: Accept pd.NA as a float #56797
Labels
Closing Candidate
May be closeable, needs more eyeballs
Enhancement
Needs Triage
Issue that has not been reviewed by a pandas team member
PDEP missing values
Issues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
In
float[pyarrow]
data, missings values arepd.NA
. I can easily convert these frames to floats:pd.Series([pd.NA], dtype='float[pyarrow]').astype('float')
But in the
pd.Series
constructor, I cannot usepd.NA
s:pd.Series([pd.NA], dtype='float')
Is this by design?
Feature Description
It would be so much more convenient if
pd.NA
would 'just' be recognized as anp.nan
in float context...Alternative Solutions
Using
.astype('float')
is a workaround but makes code less generic.Additional Context
I searched for issues like this or a design statement, but could not find anything about this specific thing, which surprised me as it feels like a common inconvenience.
The text was updated successfully, but these errors were encountered: