get_tabular_separator#
- petpal.io.table.get_tabular_separator(ext: str) str#
Get the separator corresponding to a given tabular data filetype.
‘.csv’ will return ‘,’ while ‘.tsv’ and ‘.txt’ will return ‘ ‘. Any other input will raise a ValueError.
- Parameters:
ext (str) – Extension to get matching separator for.
- Returns:
sep (str) – Separator matched from extension.
- Raises:
ValueError – If extension is not .csv or .tsv.