correlation_matrix
Compute Pearson correlation matrix for numeric columns in an Excel sheet. Optionally select columns or write results to an output sheet or file.
Instructions
Compute a Pearson correlation matrix for numeric columns.
Args: file_path: Workbook path. sheet_name: Worksheet name. columns: Optional list of column names to include. If None, all numeric columns are used. output_sheet: Optional sheet name to write the matrix. output_file: Optional file path to write results. header_row: 1-based header index.
Returns: dict: {"columns": [...], "matrix": [[float, ...], ...]}.
Notes:
- Read-only unless output_sheet/output_file is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | No | ||
| file_path | Yes | ||
| header_row | No | ||
| sheet_name | Yes | ||
| output_file | No | ||
| output_sheet | No |