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

Generate code to access dataframe #8

Closed
2 tasks done
kirangadhave opened this issue Mar 1, 2023 · 0 comments · Fixed by #44
Closed
2 tasks done

Generate code to access dataframe #8

kirangadhave opened this issue Mar 1, 2023 · 0 comments · Fixed by #44
Assignees

Comments

@kirangadhave
Copy link
Member

kirangadhave commented Mar 1, 2023

Each node in the Trrack graph should have a pointer to a dataframe. The dataframes can be saved in Python dict with trrack node ids as keys and names formatted like df_{first 6 digits of trrack id}.

Clicking on the copy button should generate the dataframe in memory if it doesn't exist and copy a code snippet to retrieve the dataframe. E.g. IDE.get_df(<dataframe name>)

The dataframe should be usable in downstream code as usual. On kernel restart the dataframe wouldn't exist in memory, so the code using the variable should fail. So the cell with trrack interaction needs to be re-run. This is expected even in basic python code.

Update

There are two ways to generate the dataframe. Create dynamic dataframe generates a dynamic dataframe. This variable is kept in sync with the current node in the provenance graph. On restarting the kernel running the cell generates the variable.

Another way to create a dataframe is to use copy button on the provenance graph. This dataframe is associated with that specific node.
You must go to the node at least once after the kernel reset.

@kirangadhave kirangadhave self-assigned this Mar 2, 2023
@kirangadhave kirangadhave changed the title Generate code to create dataframe Generate code to access dataframe May 29, 2023
kirangadhave added a commit that referenced this issue Jun 13, 2023
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 a pull request may close this issue.

1 participant