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

how do I use dballe.Data object? #191

Closed
lidiabressan opened this issue Nov 15, 2019 · 7 comments
Closed

how do I use dballe.Data object? #191

lidiabressan opened this issue Nov 15, 2019 · 7 comments

Comments

@lidiabressan
Copy link

how do I use dballe.Data object?
I'm doing a query and I get a dballe.Data object. I want to add a new variable (ok) and delete an other one (I want to change the variable code).
How do I change the object? What is the object? Just for visualization? In the documentation it is not clear (https://arpa-simc.github.io/dballe/python/dballe_types.html).

Thanks
ciao Lidia

@lidiabressan
Copy link
Author

solution: i use a data_dict instead, but is it ok to get these level values if i print it in python?

'level': dballe.Level(21947,-1835950064,21947,None),

By reading the database, the level values are (101,None,None,None) or (201,None,None,None)

@lidiabressan
Copy link
Author

what is the difference between cursorx and cursorxDB? aren't they the same?

@spanezz
Copy link
Contributor

spanezz commented Dec 6, 2019

I have extended dballe.Data documentation quite a bit, it should be available on the next dballe rebuild together with some uses that were missing.

Here is the coming documentation but these two bits require a new dballe to work:

            # This converts units automatically
            data["B12101"] = data["12001"]
            del data["B12001"]

@spanezz
Copy link
Contributor

spanezz commented Dec 6, 2019

CursorX and CursorXDB are effectively the same, only the *DB versions contain database IDs like ana_id, and the others do not

@spanezz
Copy link
Contributor

spanezz commented Dec 6, 2019

I'd leave this issue open at least until the new dballe is available and you can try it. Let me know if the explanations now are useful or if something still feels missing

@spanezz
Copy link
Contributor

spanezz commented Jan 9, 2020

I have added to the sources in d6b7e00 a python HOWTO section, with an example on how to change the varcode of a value.

@spanezz spanezz removed their assignment Aug 21, 2020
@edigiacomo
Copy link
Member

Questa issue è stata chiusa per inattività. Nel caso in cui sia un argomento ancora rilevante, si prega di riaprirla con una motivazione che tenga conto delle modifiche applicate nel corso degli anni al progetto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants