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 function to simplify measurements dataframe #42

Closed
veenstrajelmer opened this issue Mar 3, 2024 · 0 comments · Fixed by #43
Closed

add function to simplify measurements dataframe #42

veenstrajelmer opened this issue Mar 3, 2024 · 0 comments · Fixed by #43

Comments

@veenstrajelmer
Copy link
Collaborator

  • ddlpy version: master
  • Python version: 3.11
  • Operating System: Windows

Description

The returned measurements dataframe is very complete. However, it contains a lot of metadata that is often the same for all rows. Add a function to drop all these constant rows and that return a dict with all the key+value pairs. This would also help in the conversion to e.g. xarray.

What I Did

This function adds all constant metadata to a xarray dataset attrs and all varying metadata as additional variables to the xarray dataset. It can be used as a first step:
https://github.com/Deltares/dfm_tools/blob/a8e5631e8c0257a29f3b0a4397f97f9fee1ace84/dfm_tools/observations.py#L919-L935

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