Open yasirroni opened 3 weeks ago
I'm positive on convert_dtypes
supporting complex, currently it raises TypeError: complex128 cannot be converted to FloatingDtype
if input has complex dtype. There is no Numpy-nullable complex array nor a PyArrow complex dtype, so for both backends this will be a noop (leaves complex data as-is).
convert_dtypes should be able to do this type of coercion from string complex looking
convert_dtypes does not convert strings to non-strings, so the current behavior of pd.DataFrame(['1.0+5j', '1.5-3j']).convert_dtypes()
looks correct to me.
Feature Type
[ ] Adding new functionality to pandas
[X] Changing existing functionality in pandas
[ ] Removing existing functionality in pandas
Problem Description
convert_dtypes should be able to do this type of coercion from string complex looking
Related to closed https://github.com/pandas-dev/pandas/issues/4895
Feature Description
-
Alternative Solutions
-
Additional Context
No response