          
            // Header
            html += '<thead><tr>';
            for (const col of df.columns || []) {
                html += `<th>${escapeHtml(col)}</th>`;
            }
            html += '</tr></thead>';
            
            // Body
            html += '<tbody>';
            for (const row of df.rows || []) {
                html += '<tr>';
                for (const cell of row) {
                    html += `<td>${escapeHtml(String(cell))}</td>`;
                }
                h