execute_multiline_pandas_on_html_table
Execute multi-line pandas code on EnergyPlus HTML table data to analyze simulation results. Access the table as 'df' and assign output to 'result' to return values.
Instructions
Execute multi-line pandas code on HTML table data from an EnergyPlus model.
Retrieves an HTML table and executes multi-line pandas code on it. The dataframe is available as 'df' in your code. Use 'result = ...' to return values.
Args: id: The model_id of the EnergyPlus model (obtain from get_available_models). query_tuple: A tuple containing (zone/component, report_name, table_name) to identify the table. code: Multi-line Python code to execute
Returns: String representation of the result or execution status.
Examples: # Complex table analysis code = ''' # Convert numeric columns numeric_cols = df.select_dtypes(include=[np.number]).columns df_numeric = df[numeric_cols]
# Calculate totals and percentages
totals = df_numeric.sum()
percentages = (df_numeric / totals) * 100
result = percentages
'''
execute_multiline_pandas_on_html_table(model_id, query_tuple, code)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"query_tuple": "<query_tuple>",
"code": "<code>"
},
"name": "execute_multiline_pandas_on_html_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | Yes | ||
| query_tuple | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |