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

Add nodes_to_dataframe and edges_to_dataframe methods for SQLite databases #109

Merged
merged 11 commits into from
Aug 17, 2022

Conversation

cmutel
Copy link
Member

@cmutel cmutel commented Aug 17, 2022

Closes #106. Doesn't work for IO tables.

Chose not to use caching; if you need this, it is easy to add, and the memory hit for normal users is big enough that the benefits don't outweigh the tradeoffs IMHO.

Pinging @romainsacchi @michaelweinold @BenPortner if you want to give input.

@cmutel
Copy link
Member Author

cmutel commented Aug 17, 2022

edges_to_dataframe uses the extraction function from wurst, which has good performance. However, for other reasons, wurst loads GIS libraries, which is a bit heavy for everyday installs, so this is optional.

@cmutel
Copy link
Member Author

cmutel commented Aug 17, 2022

After some reflection, I think we should move the extraction functions from wurst to bw2data, and leave a shim in wurst. This would make things a bit simpler, while avoiding duplication of code.

@cmutel
Copy link
Member Author

cmutel commented Aug 17, 2022

Moved wurst functions to bw2data in 55f1071.

@cmutel cmutel merged commit 6ef1c5a into main Aug 17, 2022
@cmutel cmutel deleted the dataframes_again branch August 17, 2022 12:34
@cmutel cmutel mentioned this pull request Aug 18, 2022
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.

Convenience method to get database as a DataFrame
1 participant