<jupyter_start><jupyter_text>Panel - DatatableThis example demonstrates how to load the [jQuery DataTable extension](https://datatables.net/) and use it to render a pandas DataFrame.<jupyter_code>script = """
<script>
if (document.readyState === "complete") {
  $('.example').DataTable();
} else {
  $(document).ready(function () {
    $('.example').DataTable();
  })
}
</script>
"""

html = autompg.to_html(classes=['example', 'panel-df'])
pn.pane.HTML(html+script, sizing_mode='stretch_width')<jupyter_output><empty_output><jupyter_text>Panel - Datatable with Export ButtonsThis example demonstrates how to add [export buttons](https://datatables.net/extensions/buttons/examples/html5/simple.html) as requested in [Discourse 2079](https://discourse.holoviz.org/t/adding-buttons-to-panel-datatable/2079)<jupyter_code>script = """
<script>
function renderTable(){
  $('.example2').DataTable( {
    dom: 'Bfrtip',
    buttons: [
        'copyHtml5',
        'excelHtml5',
        'csvHtml5',
        'pdfHtml5'
    ]
} );
}

if (document.readyState === "complete") {
  renderTable()
} else {
  $(document).ready(renderTable);
}
</script>
"""

html = autompg.to_html(classes=['example2', 'panel-df'])
table_with_export_buttons = pn.pane.HTML(html+script, sizing_mode='stretch_width', margin=(10,5,35,5))
table_with_export_buttons<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17170228445099484, 'fraction_numerical': 0.015475313190862197, 'mean_word_length': 5.316279069767442, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '98112', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 474, 'n_tokens_neox': 460, 'n_words': 75, 'path': 'examples/gallery/external/DataTable.ipynb', 'repo_name': 'JackDapid/panel', 'size': '1357'}