I have scrubbed the polars
docs and cannot see an example of creating a column with a fixed value from a variable. Here is what works in pandas
:
df['VERSION'] = version
Thx
I have scrubbed the polars
docs and cannot see an example of creating a column with a fixed value from a variable. Here is what works in pandas
:
df['VERSION'] = version
Thx
Use polars.lit
import polars as pl
version = 6
df = df.with_columns(pl.lit(version).alias('VERSION'))