Spec-Zone.ru › Nushell

polars join-where for lazyframe

Joins a lazy frame with other lazy frame based on conditions.

Signature

> polars join-where {flags} (other) (condition)

Parameters

  • other: LazyFrame to join with.
  • condition: Condition.

Input/output types:

input output
polars_dataframe polars_dataframe
polars_lazyframe polars_lazyframe

Examples

Join two lazy dataframes with a condition

> 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API