tessl install tessl/pypi-tabulate@0.9.0Pretty-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%
Build a program that generates formatted financial reports from data files. The program should read financial data and produce well-aligned tables suitable for presentation in reports.
Your program should read financial data from a CSV file and generate a formatted table with appropriate column alignment. The input CSV will contain:
The program must:
The CSV file will have the following columns:
Account,Current,Prior,Variance,StatusExample input file (financial_data.csv):
Account,Current,Prior,Variance,Status
Revenue,125000.50,98000.00,27.55,Good
Operating Expenses,45000.75,52000.00,-13.46,Good
Net Income,80000.25,46000.00,73.91,Good
Cash Flow,15500.00,28000.00,-44.64,WarningThe program should produce a table with clear borders and properly aligned columns. Numeric columns should align on decimal points for easy comparison.
@generates
def generate_report(csv_filepath: str) -> str:
"""
Read financial data from a CSV file and return a formatted table.
Args:
csv_filepath: Path to the CSV file containing financial data
Returns:
A formatted string containing the table with proper alignment
"""
passProvides table formatting support.