elixir-explorer / explorer

Series (one-dimensional) and dataframes (two-dimensional) for fast and elegant data exploration in Elixir
https://hexdocs.pm/explorer
MIT License
1.12k stars 123 forks source link

Fix overwrite of dtypes for `DF.load_csv/2` #955

Closed philss closed 3 months ago

philss commented 3 months ago

Using the with_schema function does not work correctly because Polars expects to receive all column names, and with the correct order. We are passing a map to the backend, and then we transform that to a list before calling the Rust code. So the schema could be out-of-order.

We are now using with_schema_overwrite for both load_csv and from_csv.

Closes https://github.com/elixir-explorer/explorer/issues/953