Skip to main content

slice

The slice command extracts a slice of rows from a CSV file.

Syntax

qsv slice [options] <start> <end> <input_file> [<output_file>]

Description

The slice command is used to extract a slice of rows from a CSV file. This is useful for working with specific subsets of data.

Options

  • --no-headers: When set, the first row will not be interpreted as headers

Examples

Extract Slice

Extract rows 10 to 20 from a CSV file:

qsv slice 10 20 DLD_Transactions_English_500.csv | qsv table

Common Use Cases

  • Working with specific subsets of data
  • Preparing data for analysis or processing

Tips

  • Verify the output to ensure the correct slice is extracted
  • Use in combination with other commands for complex data processing

See Also

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