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

New method: cf.Field.filled #811

Closed
davidhassell opened this issue Sep 3, 2024 · 0 comments · Fixed by #812
Closed

New method: cf.Field.filled #811

davidhassell opened this issue Sep 3, 2024 · 0 comments · Fixed by #812
Labels
enhancement New feature or request
Milestone

Comments

@davidhassell
Copy link
Collaborator

davidhassell commented Sep 3, 2024

It would be useful to provide the filled method to Field objects - it is currently only defined on cf.Data (https://ncas-cms.github.io/cf-python/method/cf.Data.filled.html).

So, currently, to fill a field's missing values no in-place you have to do something like

>>> g = f.copy()
>>> g.data.filled(0, inplace=True)

but it would be much nicer to be able to do, with the same result:

>>> f.filled(0, inplace=True)
@davidhassell davidhassell added the enhancement New feature or request label Sep 3, 2024
@davidhassell davidhassell added this to the NEXT VERSION milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant