-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
releasedIncluded in a releaseIncluded in a release
Description
Is your feature request related to a problem?
When transforming a column of a table or computing a new one, it is sometimes beneficial to compute multiple values and pick the first that is not None. For example, we might try to transform a column that contains date strings in various formats into an actual date column.
Desired solution
Add a static method Cell.first_not_none. It should have one parameter cells: list[Cell] and return a new cell containing the first non-None cell value. The implementation should use the _LazyCell.
Use pl.coalesce internally.
Return None if all conversions returned None.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
releasedIncluded in a releaseIncluded in a release
Type
Projects
Status
✔️ Done