Skip to content
Beta · version 0.7.4 · commands and the JSON format may still change.

First and last rows

first and last keep the first or the last records of the file, in file order.

Terminal window
tabalyst sample customers.csv --sample-method first --rows 1000
tabalyst sample customers.csv --sample-method last --rows 1000
  • Use it when you only need the start or the end of the file.
  • Size: --rows or --percent, exactly one.
  • Cost: one reading of the file.
  • Seed: none. The rows are kept in file order, so --seed is an error with these methods (exit code 2).
  • Output: customers.sample.csv beside the source.
  • The rows are not chosen to represent the file. For the proportions use a random or stratified sample; for the rare cases use a smart sample.
  • --seed, --field, --max-strata, --yes and --no-html are errors with these methods (exit code 2).

See Tabalyst Sample for sizes, output locations and CSV formats.