polars join-where для lazyframe
Объединяет ленивый фрейм с другим ленивым фреймом на основе условий.
Сигнатура
> polars join-where {flags} (other) (condition)
Параметры
-
other: LazyFrame для объединения. -
condition: Условие.
Типы входных и выходных данных:
| вход | выход |
|---|---|
| polars_dataframe | polars_dataframe |
| polars_lazyframe | polars_lazyframe |
Примеры
Объединение двух ленивых фреймов данных по условию
> let df_a = ([[name cash];[Alice 5] [Bob 10]] | polars into-lazy)
let df_b = ([[item price];[A 3] [B 7] [C 12]] | polars into-lazy)
$df_a | polars join-where $df_b ((polars col cash) > (polars col price)) | polars collect
╭───┬───────┬──────┬──────┬───────╮
│ # │ name │ cash │ item │ price │
├───┼───────┼──────┼──────┼───────┤
│ 0 │ Bob │ 10 │ B │ 7 │
│ 1 │ Bob │ 10 │ A │ 3 │
│ 2 │ Alice │ 5 │ A │ 3 │
╰───┴───────┴──────┴──────┴───────╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_join-where.html