Dash DataTable

5.0.0 · deprecated · verified Sat Apr 11

Dash DataTable (`dash.dash_table.DataTable`) is an interactive table component designed for viewing, editing, and exploring large datasets within Dash web applications. It is rendered with standard HTML <table> markup, making it accessible, responsive, and highly customizable. The `dash-table` PyPI package is currently at version 5.0.0, but the component is officially deprecated and slated for removal from the core Dash API in Dash 5.0 of the main `dash` package. Users are advised to migrate to `dash-ag-grid` for future development.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a basic Dash application with a DataTable. It reads data from a CSV using pandas and displays it in an interactive table.

import dash
from dash import dash_table, html
import pandas as pd

# Sample data (e.g., from a CSV)
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')

app = dash.Dash(__name__)

app.layout = html.Div([
    dash_table.DataTable(
        id='table-basic',
        columns=[{"name": i, "id": i} for i in df.columns],
        data=df.to_dict('records'),
    )
])

if __name__ == '__main__':
    app.run_server(debug=True)

view raw JSON →