Skip to content

Generalize pr.set #237

@mikapfl

Description

@mikapfl

Is your feature request related to a problem? Please describe.

Xarray lacks an easy-to-use solution for setting specific values. Unfortunately, pr.set also doesn't handle all use cases so far.

Describe the solution you'd like

It would be great to handle the following cases:

  • Like combine_first, but preserving NaNs in early objects before alignment.
  • Like set, but instead of dim and key, have a sel, so that it looks like da.pr.set(sel, value).
  • Support scalar NaN value in ds.set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions