Table Detection¶
Detect and classify tables in spreadsheets.
Advanced table detection and classification utilities.
- class sheetwise.smart_tables.TableType(value)[source]¶
Types of tables that can be detected.
- DATA_TABLE = 'data_table'¶
- PIVOT_TABLE = 'pivot_table'¶
- MATRIX = 'matrix'¶
- FORM = 'form'¶
- MIXED = 'mixed'¶
- SPARSE = 'sparse'¶
- class sheetwise.smart_tables.EnhancedTableRegion(top_left, bottom_right, rows, cols, confidence=1.0, table_type=TableType.DATA_TABLE, has_headers=False, header_rows=None, header_cols=None)[source]¶
Extended table region with additional metadata.
- __init__(top_left, bottom_right, rows, cols, confidence=1.0, table_type=TableType.DATA_TABLE, has_headers=False, header_rows=None, header_cols=None)¶
- class sheetwise.smart_tables.SmartTableDetector(min_table_size=2, max_empty_ratio=0.7, header_detection=True)[source]¶
Advanced table detection with enhanced capabilities.
This class provides utilities to: 1. Detect multiple tables in spreadsheets 2. Identify table headers and structures 3. Classify tables by type 4. Handle complex table layouts
- __init__(min_table_size=2, max_empty_ratio=0.7, header_detection=True)[source]¶
Initialize the detector.