8000 Reading boolean in excel with null · Issue #260 · amphi-ai/amphi-etl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reading boolean in excel with null #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
simonaubertbd opened this issue Apr 27, 2025 · 2 comments
Open

Reading boolean in excel with null #260

simonaubertbd opened this issue Apr 27, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@simonaubertbd
Copy link
Contributor

Hello

My input file (see attached)

Image

test_formatchamp_amphi.xlsx

Result when reading on Amphi :

Image

As you can see, one of the boolean becomes a numeric (exactly an int64), this is due to the null values. This is a known issue on pandas but it's solvable by defining a dtype_backend, either numpy_nullable either pyarrow

For reference pandas-dev/pandas#45903

Image

Image

Same with pyarrow

Image

Best regards,

Simon

@tgourdel
Copy link
Contributor

What if you use the type converter? Does it convert it successfully?

@simonaubertbd
Copy link
Contributor Author

Hello @tgourdel
nope
cannot convert float NaN to bool

(and I would say it's "too late").

@tgourdel tgourdel added the bug Something isn't working label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0