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

Fix IO issues for 'io.network_from_csv' #2948

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

hpc-dave
Copy link
Contributor

Here, two issues are addressed:

  1. A DtypeWarning appears when using io.network_from_csv, that mixed types were encountered. Since specifying the dtype is not generally possible, the flag low_memory=False has to be set to avoid this warning by pandas.
  2. For the columns with boolean values, pandas keeps the general Object type (dtype('O')), which can lead to issues later on, especially when trying to use the values directly. Especially nasty to debug when used in combination with topotools. This issue is fixed by adding an additional conversion step at the end of the function io.network_from_csv

Encountered with pandas v2.2.2 and numpy v2.0.0

Here, two issues are addressed:
1) A DtypeWarning appears when using 'io.network_from_csv', that mixed types were encountered. Since specifying the dtype is not generally possible, the flag low_memory=False has to be set to avoid this warning by pandas.
2) For the columns with boolean values, pandas keeps the general Object type (dtype('O')), which can lead to issues later on, especially when trying to use the values directly. Especially nasty to debug when used in combination with topotools. This issue is fixed by adding an additional conversion step at the end of the function 'io.network_from_csv'
Fix IO issues for 'io.network_from_csv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant