polars save for lazyframe
Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson).
Signature
> polars save {flags} (path)
Flags
-
--type, -t {string}: File type: csv, json, parquet, arrow/ipc. If omitted, derive from file extension. -
--avro-compression {string}: Compression for avro supports deflate or snappy. -
--csv-delimiter {string}: File delimiter character. -
--csv-no-header: Indicates to exclude a header row for CSV files.
Parameters
-
path: Path or cloud url to write to.
Input/output types:
| input | output |
|---|---|
| any | string |
Examples
Performs a streaming collect and save the output to the specified file
> [[a b];[1 2] [3 4]] | polars into-lazy | polars save test.parquet
Saves dataframe to parquet file
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.parquet
Saves dataframe to arrow file
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.arrow
Saves dataframe to NDJSON file
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.ndjson
Saves dataframe to avro file
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.avro
Saves dataframe to CSV file
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.csv
Saves dataframe to CSV file using other delimiter
> [[a b]; [1 2] [3 4]] | polars into-df | polars save test.csv --csv-delimiter '|'
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_save.html