Pretty-print tabular data in Python with extensive formatting options and output format support.
Overall
score
69%
A tool that analyzes tabular data and reports the inferred data types for each column.
[[1, "text"], [2, "more"]], the analyzer returns {0: "int", 1: "str"} @test[[1, 2.5], [2, 3.7]], the analyzer returns {0: "int", 1: "float"} @test[[1, 2.5], [2.0, 3]] where column 0 mixes int and float, the analyzer returns {0: "float", 1: "float"} @test[[1, None], [2, "text"]], the analyzer ignores None and returns {0: "int", 1: "str"} @test[], the analyzer returns an empty dictionary {} @test@generates
def analyze_column_types(data: list) -> dict:
"""
Analyzes tabular data and returns the inferred type for each column.
Args:
data: A list of lists representing rows of tabular data.
Each inner list represents a row with values for each column.
Returns:
A dictionary mapping column indices (0-based) to their inferred types.
Possible type values: "int", "float", "str", "bool", "none"
Raises:
ValueError: If data is not a list or contains non-iterable rows.
"""
passProvides table formatting and type inference capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-tabulatedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10