Description
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 are pd.NA
. I can easily convert these frames to floats:
pd.Series([pd.NA], dtype='float[pyarrow]').astype('float')
0 NaN
dtype: float64
But in the pd.Series
constructor, I cannot use pd.NA
s:
pd.Series([pd.NA], dtype='float')
TypeError: float() argument must be a string or a real number, not 'NAType'
Is this by design?
Feature Description
It would be so much more convenient if pd.NA
would 'just' be recognized as a np.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.