Series[pd.Int64Dtype]
cannot coerce columns with mixed string/int values
#1037
Labels
bug
Something isn't working
Describe the bug
It appears that
Series[pd.Int64Dtype]
cannot coerce columns with mixed string/int values. That "bug" plus the fact thatSeries[int]
cannot coerce nullable values means there is currently no pandas column withint
dtype that can coerce mixed dtypes + null values.It makes sense that
Series[int]
doesn't work with null types because python'sint
is apparently a non-nullable dtype.I documented this bug and a workaround using
Series[pd.Float64Dtype]
in the test below.Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Expected behavior
I expected a SchemaModel with column of
Series[pd.Int64Dtype]
to be able to coerce both:[1, "1"]
[1, "1", None]
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: