Код: Выделить всё
import polars as pl
df1 = pl.DataFrame({"a": range(3)})
df2 = pl.DataFrame({"b": range(3)})
expected_output = df1.join(df2, how="cross").filter(pl.col("a") < pl.col("b"))
Код: Выделить всё
shape: (3, 2)
┌─────┬─────┐
│ a ┆ b │
│ --- ┆ --- │
│ i32 ┆ i32 │
╞═════╪═════╡
│ 0 ┆ 1 │
│ 0 ┆ 2 │
│ 1 ┆ 2 │
└─────┴─────┘
Подробнее здесь: https://stackoverflow.com/questions/788 ... al-entries
Мобильная версия