Код: Выделить всё
import polars as pl
data = {
'col1': [1, 2, 3, 1, 1],
'col2': [7, 8, 9, 7, 7],
'col3': [3, 4, 5, 6, 8]
}
tmp = pl.DataFrame(data)
Код: Выделить всё
┌──────┬──────┬──────┐
│ col1 ┆ col2 ┆ col3 │
│ --- ┆ --- ┆ --- │
│ i64 ┆ i64 ┆ i64 │
╞══════╪══════╪══════╡
│ 1 ┆ 7 ┆ 3 │
│ 2 ┆ 8 ┆ 4 │
│ 3 ┆ 9 ┆ 5 │
│ 1 ┆ 7 ┆ 6 │
│ 1 ┆ 7 ┆ 9 │
└──────┴──────┴──────┘
Код: Выделить всё
┌──────┬──────┬──────┐
│ col1 ┆ col2 ┆ col3 │
│ --- ┆ --- ┆ --- │
│ i64 ┆ i64 ┆ i64 │
╞══════╪══════╪══════╡
│ 1 ┆ 7 ┆ 3 │
│ 2 ┆ 8 ┆ 4 │
│ 3 ┆ 9 ┆ 5 │
└──────┴──────┴──────┘
Подробнее здесь: https://stackoverflow.com/questions/772 ... keep-first
Мобильная версия