Код: Выделить всё
import polars as pl
df = pl.DataFrame({"col1": [1, 2, 3], "col2": [4, 5, 6]})
df_pd = df.to_pandas()
df_pd.at[2, "col2"] = 99
pl.from_pandas(df_pd)
Код: Выделить всё
shape: (3, 2)
┌──────┬──────┐
│ col1 ┆ col2 │
│ --- ┆ --- │
│ i64 ┆ i64 │
╞══════╪══════╡
│ 1 ┆ 4 │
│ 2 ┆ 5 │
│ 3 ┆ 99 │
└──────┴──────┘
Подробнее здесь: https://stackoverflow.com/questions/760 ... -dataframe