From 72705c7b05ae065712da0a50112f85a40cac00a5 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Tue, 16 Apr 2024 10:21:41 +0200 Subject: [PATCH] rm index --- pdf_build_src/process_markdowns.py | 2 +- pdf_build_src/tests/data/read_from_tsv/expected.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdf_build_src/process_markdowns.py b/pdf_build_src/process_markdowns.py index 44eeb2e233..b9af1c29a0 100644 --- a/pdf_build_src/process_markdowns.py +++ b/pdf_build_src/process_markdowns.py @@ -329,7 +329,7 @@ def read_table_from_tsv(input_file: Path, output_file : Path | None = None): assert table_to_read.exists(), f"This file does not exist\n:{table_to_read}" df = pd.read_csv(table_to_read, sep="\t") - df_as_md = df.to_markdown() + df_as_md = df.to_markdown(index=False) f.write(df_as_md) f.write("\n") diff --git a/pdf_build_src/tests/data/read_from_tsv/expected.md b/pdf_build_src/tests/data/read_from_tsv/expected.md index f09f9dac07..b8a3ce51a6 100644 --- a/pdf_build_src/tests/data/read_from_tsv/expected.md +++ b/pdf_build_src/tests/data/read_from_tsv/expected.md @@ -2,9 +2,9 @@ lorem ipsum -| | onset | duration | response_time | trial_type | trial_extra | -|---:|--------:|-----------:|----------------:|:-------------|:--------------| -| 0 | 200 | 20 | 15.8 | word | 中国人 | -| 1 | 240 | 5 | 1.734 | visual | nan | +| onset | duration | response_time | trial_type | trial_extra | +|--------:|-----------:|----------------:|:-------------|:--------------| +| 200 | 20 | 15.8 | word | 中国人 | +| 240 | 5 | 1.734 | visual | nan | TSV files MUST be in UTF-8 encoding.