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

Advanced convert to Pandas for hierarchcial DynamicTables #13

Merged
merged 15 commits into from
Nov 19, 2019

Conversation

oruebel
Copy link
Owner

@oruebel oruebel commented Nov 8, 2019

Problem "For storage and queries on specific tables it is useful to represent data in a normalized fashion in a hierarchy of tables define by the extension. This avoids repeating data values (which can easily lead to errors and data inconsistencies) and allows us to interact with the data at the appropriate level. For visualization and queries across tables, however, it can be useful to represent the data in a single table (i.e., Pandas DataFrame).

Approach This PR adds a new class HierarchicalDynamicTableMixin which serves a mixin class for DynamicTables that reference other tables in a hierarchical fashion (like is done in this extension). The HierarchicalDynamicTableMixin class provides functions to convert all data from the hierarchical DynamicTables into a single hierarchical (or flat) Pandas DataFrame. This allows us to represent (and accordingly query) all data via a single table. This PR also adds an example illustrating the result of this conversion process.

@oruebel oruebel requested review from ajtritt and rly November 8, 2019 12:48
@oruebel oruebel merged commit 82fa61a into master Nov 19, 2019
@oruebel oruebel deleted the enh/convert_pandas branch November 19, 2019 04:00
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