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

Pandas updates and get_obs method #190

Merged
merged 10 commits into from
Mar 7, 2024
Merged

Pandas updates and get_obs method #190

merged 10 commits into from
Mar 7, 2024

Conversation

OnnoEbbens
Copy link
Collaborator

@OnnoEbbens OnnoEbbens commented Mar 7, 2024

some fixes for future warnings in Pandas and a new method to get an observation from a collection.

Previously if you wanted to get an observation from a collection you had to do:

# select by name
o = oc.loc['name', 'obs']
# select by properties
o = oc.loc[(oc['monitoring_well'] == 'GMW001234'] & oc['tube_nr'] == 1]), 'obs'].values[0]

With the new method you can do:

# select by name
o = oc.get_obs(name)
# select by properties
o = oc.get_obs(monitoring_well='GMW001234', tube_nr=1)

The old way still works, so no backward compatibility issues.

@OnnoEbbens OnnoEbbens marked this pull request as draft March 7, 2024 10:51
@OnnoEbbens OnnoEbbens marked this pull request as ready for review March 7, 2024 11:14
@OnnoEbbens OnnoEbbens merged commit 0686b11 into dev Mar 7, 2024
8 checks passed
@OnnoEbbens OnnoEbbens deleted the pandas_updates branch March 7, 2024 14:04
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.

2 participants