Код: Выделить всё
import polars as pl
df = pl.from_repr("""
┌─────┬───────┐
│ one ┆ two │
│ --- ┆ --- │
│ str ┆ str │
╞═════╪═══════╡
│ a ┆ hola │
│ b ┆ world │
└─────┴───────┘
""")
Код: Выделить всё
shape: (2, 2)
┌─────┬───────┐
│ one ┆ two │
│ --- ┆ --- │
│ str ┆ str │
╞═════╪═══════╡
│ a ┆ hello │ #
Подробнее здесь: [url]https://stackoverflow.com/questions/75984983/polars-change-a-value-in-a-dataframe-if-a-condition-is-met-in-another-column[/url]