dfr open for dataframe

Opens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe.

WARNING

Dataframe commands were not shipped in the official binaries by default, you have to build it with --features=dataframe flag

Signature

> dfr open {flags} (file)

Flags

  • --lazy, -l: creates a lazy dataframe
  • --type, -t {string}: File type: csv, tsv, json, parquet, arrow, avro. If omitted, derive from file extension
  • --delimiter, -d {string}: file delimiter character. CSV file
  • --no-header, -: Indicates if file doesn't have header. CSV file
  • --infer-schema, - {number}: Number of rows to infer the schema of the file. CSV file
  • --skip-rows, - {number}: Number of rows to skip from file. CSV file
  • --columns, - {list<string>}: Columns to be selected from csv file. CSV and Parquet file
  • --schema, -s {record}: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files

Parameters

  • file: file path to load values from

Input/output types:

inputoutput
anyany

Examples

Takes a file name and creates a dataframe

> dfr open test.csv