W3cubDocs

/Nushell

dfr open for dataframe

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

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

Parameters

  • file: file path to load values from

Input/output types:

input output
any any

Examples

Takes a file name and creates a dataframe

>dfr opentest.csv

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

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/dfr_open.html