CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-tabulate

tessl install tessl/pypi-tabulate@0.9.0

Pretty-print tabular data in Python with extensive formatting options and output format support.

Agent Success

Agent success rate when using this tile

69%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.9x

Baseline

Agent success rate without this tile

77%

task.mdevals/scenario-1/

Data Type Analyzer

A tool that analyzes tabular data and reports the inferred data types for each column.

Capabilities

Parse and analyze tabular data

  • Given the data [[1, "text"], [2, "more"]], the analyzer returns {0: "int", 1: "str"} @test
  • Given the data [[1, 2.5], [2, 3.7]], the analyzer returns {0: "int", 1: "float"} @test
  • Given the data [[1, 2.5], [2.0, 3]] where column 0 mixes int and float, the analyzer returns {0: "float", 1: "float"} @test

Handle None values and edge cases

  • Given the data [[1, None], [2, "text"]], the analyzer ignores None and returns {0: "int", 1: "str"} @test
  • Given an empty table [], the analyzer returns an empty dictionary {} @test

Implementation

@generates

API

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.
    """
    pass

Dependencies { .dependencies }

tabulate { .dependency }

Provides table formatting and type inference capabilities.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/tabulate@0.9.x
tile.json