I have a hard time with what should be a very common use case on polars dataframes. I simply want to create a new column on an existing dataframe based on some other column. Here is the code I try, but doesn't work:
import polars as pl
df.with_columns(
(pl.col('old_col').map_elements(lambda x: func(x)).alias("new_col"),
)