Skip to content

[Enh]: add coalesce top level function #2639

Open
@rchui

Description

@rchui

We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?

No response

Please describe the purpose of the new feature or describe the problem to solve.

https://docs.pola.rs/api/python/dev/reference/expressions/api/polars.coalesce.html

This is a very common operation when joining tables or combining two columns into a single column.

Suggest a solution if possible.

No response

If you have tried alternatives, please describe them below.

Instead of coalesce you can re-implement this with when-then-otherwise but it can be tedious to handle a variadic number of parameters.

Additional information that may help us understand your needs.

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions