Fix tsv and csv

This commit is contained in:
Hiroki Ito 2024-06-09 01:07:56 +09:00
parent 9b7f899410
commit d676559d71
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ fn from_delimited_stream(
.from_reader(input_reader);
let headers = if noheaders {
(1..=reader
(0..reader
.headers()
.map_err(|err| from_csv_error(err, span))?
.len())

View File

@ -284,7 +284,7 @@ fn from_csv_text_skipping_headers_to_table() {
r#"
open los_tres_amigos.txt
| from csv --noheaders
| get column3
| get column2
| length
"#
));

View File

@ -207,7 +207,7 @@ fn from_tsv_text_skipping_headers_to_table() {
r#"
open los_tres_amigos.txt
| from tsv --noheaders
| get column3
| get column2
| length
"#
));