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

Change data_id? #601

Closed
vijaydewan opened this issue Nov 20, 2021 · 3 comments
Closed

Change data_id? #601

vijaydewan opened this issue Nov 20, 2021 · 3 comments

Comments

@vijaydewan
Copy link

Hey Andrew,

Thanks again for all of the great work on this project! I was wondering if there is an easy way to change the data_id once data is loaded?

e.g., --

startup("", data=test data, name="test", data_id=1)

[code to change data_id from 1 to 2]

I hope that makes sense.

Thanks!

@aschonfeld
Copy link
Collaborator

@vijaydewan there currently is not an easy way to do this. I can work on adding a function update_id(2) to instance objects. For example:

import pandas as pd
import dtale

d = dtale.show(pd.DataFrame([1,2,3,4,5])) # data_id -> 1
d.update_id(2) # data_id -> 2

I can also add a global function:

import pandas as pd
import dtale

d = dtale.show(pd.DataFrame([1,2,3,4,5]))
dtale.update_id(d._data_id, 2)

Will update once it's released. Hope this is what you were picturing

@vijaydewan
Copy link
Author

Thanks!

@aschonfeld
Copy link
Collaborator

@vijaydewan just released v2.2.0 with this update

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

No branches or pull requests

2 participants