Rust Polars iterate ChunckedArray
I was following this answer but it didn’t work for me on my version (polars = { version = “0.42.0”, features = [“dtype-struct”, “lazy”, “polars-io”] }). I see that in new version into_struct
returns ChunckedArray<StructType>
instead of StructChuncked
. It’s surprising that iter
in new version gives Option<()>
which seems useless. Does it mean that it’s impossible to iterate over ChunckedArray<StructType>
? Or is there a different way of doing that? Also if you know the motivation behind that change I’d be glad to learn about that.
Using subset of features in Polars’ crate
I am using Polars in Rust. I have noticed that compile times drop significantly and give a smaller binary when using the polars-core
crate instead of the polars
crate.
However, it’s discouraged to use this “internal” crate.
One of sort() doesn’t do anything
let mut scores = df .lazy() .select(v_exprs) .sort( [“150:AvgCUS”], SortMultipleOptions::new().with_order_descending(true), ) .sort([“Included”], SortMultipleOptions::new()) .sort([“Excluded”], SortMultipleOptions::new()) .collect()?; This code sorted the dataframe sequentially(sort “150:AvgCUS” first, and then “Included”, “Excluded”), similar to Excel’s behavior before update of polars. But on latest polars after breaking changes of sort() api, the df is sorted by “Included”, “Excluded” columns correctly, […]