dbs_annotator.utils.tsv_columns

Canonical TSV column names and legacy alias handling.

Functions

block_id_from_row(row)

Return the block index from a csv.DictReader row.

canonicalize_row_block_id(row)

Ensure the row dict uses block_ID (drop legacy keys).

normalize_block_id_dataframe(df)

Rename legacy block-index columns to block_ID.

normalize_tsv_fieldnames(fieldnames)

Map legacy block_id header to block_ID (once per file).

read_session_tsv(path)

Read a programming-session TSV and normalize column names.