Skip to main content

to

The to command converts CSV data to various formats.

Syntax

qsv to [options] <format> <input_file> [<output_file>]

Description

The to command is used to convert CSV data to various formats, such as JSON, Excel, and more. This is useful for integrating with different systems and tools.

Options

  • --no-headers: When set, the first row will not be interpreted as headers
  • --pretty: Output pretty-printed JSON (if converting to JSON)

Examples

Convert to JSON

Convert CSV data to JSON format:

qsv to json DLD_Transactions_English_500.csv | qsv table

Convert to Excel

Convert CSV data to Excel format:

qsv to xlsx DLD_Transactions_English_500.csv output.xlsx

Common Use Cases

  • Integrating with different systems and tools
  • Converting data for analysis or processing

Tips

  • Verify the output to ensure the data is correctly converted
  • Use in combination with other commands for complex data processing

See Also

  • select - for selecting specific columns
  • apply - for data transformations