ENH: Cast string dtype to nullable numeric types in to_numeric #37294
Labels
Enhancement
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
Strings
String extension data type and string data
#37268 fixed a bug so that nullable string dtype can now be cast to numeric from "number-like" strings and NA, however the output dtype is currently float64. Better would be for this to cast to either nullable Int64 or Float64 depending on the values. Below is master:
The first case would ideally cast to Int64, and the second to Float64.
The text was updated successfully, but these errors were encountered: