
        function displayError(cellId, error) {
            const outputDiv = document.getElementById(`output-${cellId}`);
            if (!outputDiv) return;
            
            outputDiv.style.display = 'block';
            outputDiv.innerHTML = `<div class="error-output"><div class="traceback">Error: ${escapeHtml(error)}</div></div>`;
        }
        
        function formatDataFrame(df) {
            // Format DataFrame as HTML table
            let html = '<div class="table-wrapper"><table>';
  