In Polars 0.46.0 it works normally:
let df = df!(
"id" => [0, 1, 2, 3, 4],
"col_1" => [1, 2, 3, 4, 5],
"col_2" => [3, 4, 5, 6, 7],
)
.unwrap();
dbg!(&df);
let s = df.column("col_2").unwrap().as_materialized_series();
let combo = df
.clone()
.lazy()
.filter(col("id").is_in(lit(s.clone()), false))
.collect()
.unwrap();
dbg!(&combo);
The same code in Polars 0.50.0 is deprecated:
Deprecation:
is_inwith a collection of the same datatype is ambiguous and deprecated. Please useimplodeto return to previous behavior. See https://github.com/pola-rs/polars/issues/22149 for more information.
How should I write it in Polars 0.50.0, to not get a deprecation warning?