Skip to content
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

Fixed bug arising due to a type error #523

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

Magnus167
Copy link
Member

The error was due to NaN types in pandas dataframes.
The code requires the dataframe values to be converted to numerical types. However, NaN cannot be represented in integers, as numpy (a core pandas dependency) does not provide this functionality. Therefore, we cast the values to floating-point numbers (floats) which provide functionality for NaN (as well as inf.).
This is a documented pandas "gotcha".

Refs:
https://pandas.pydata.org/pandas-docs/stable/user_guide/gotchas.html#support-for-integer-na
and
https://stackoverflow.com/a/21290084/4417821

@Magnus167 Magnus167 linked an issue Sep 27, 2022 that may be closed by this pull request
@lsimonsen lsimonsen added the bug Something isn't working label Sep 29, 2022
@Magnus167 Magnus167 merged commit 78859d5 into develop Sep 30, 2022
@lsimonsen lsimonsen deleted the bugfix/check_availability_496 branch October 10, 2022 09:25
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

Successfully merging this pull request may close these issues.

check_availability bug still alive and kicking
2 participants