nushell/crates/nu_plugin_polars/src/dataframe
Jack Wright 5f818eaefe
Ensure that lazy frames converted via to-lazy are not converted back to eager frames later in the pipeline. (#12525)
# Description
@maxim-uvarov discovered the following error:
```
> [[a b]; [6 2] [1 4] [4 1]] | polars into-lazy | polars sort-by a | polars unique --subset [a]
Error:   × Error using as series
   ╭─[entry #1:1:68]
 1 │ [[a b]; [6 2] [1 4] [4 1]] | polars into-lazy | polars sort-by a | polars unique --subset [a]
   ·                                                                    ──────┬──────
   ·                                                                          ╰── dataframe has more than one column
   ╰────
 ```
 
During investigation, I discovered the root cause was that the lazy frame was incorrectly converted back to a eager dataframe. In order to keep this from happening, I explicitly set that the dataframe did not come from an eager frame. This causes the conversion logic to not attempt to convert the dataframe later in the pipeline.

---------

Co-authored-by: Jack Wright <jack.wright@disqo.com>
2024-04-15 18:29:42 -05:00
..
eager Handle relative paths correctly on polars to-(parquet|jsonl|arrow|etc) commands (#12486) 2024-04-12 19:30:37 -05:00
expressions Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00
lazy Ensure that lazy frames converted via to-lazy are not converted back to eager frames later in the pipeline. (#12525) 2024-04-15 18:29:42 -05:00
series Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00
values Ensure that lazy frames converted via to-lazy are not converted back to eager frames later in the pipeline. (#12525) 2024-04-15 18:29:42 -05:00
mod.rs Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00
README.md Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00
stub.rs Showing full help when running the polars command (#12462) 2024-04-10 07:26:33 -05:00
utils.rs Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00

Dataframe

This dataframe directory holds all of the definitions of the dataframe data structures and commands.

There are three sections of commands:

For more details see the Nushell book section on dataframes