Open Tishj opened 1 month ago
Thanks for the report. In the Series constructor, we call pandas.core.construction.sanitize_masked_array
which coerces the data to float because there are masked values. I'm guessing if we passed the requested dtype and it's a masked EA, we could avoid this.
Further investigations and PRs are welcome!
take
Hello everyone, I am a bit confused about how to solve this issue now. In addition to my attempts in PR, I have tried many other methods, but the results have not been very good, so I am currently a bit confused and don't know how to solve this bug.
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Creating a nullable uint64 column throws errors
Expected Behavior
I would expect this to work without throwing an error, I don't get why the data is interpreted as a float64 when
uint64
is explicitly set as the dtype on the masked arrayInstalled Versions