Skip to content

Using DataFrames#

DataFrames can be used to create static data visualizations. For dynamic data, take a look at the Data Connectors section.

Creating a DataFrame#

DataFrames can be created using the pandas library. You can create a DataFrame from various data sources such as lists, dictionaries, or external files like CSVs.

import pandas as pd
from engineai.sdk.dashboard.widgets import table

# Create a DataFrame
data = pd.DataFrame({
    "name": ["Person A", "Person B", "Person C"],
    "age": [29, 35, 30]
})

# Create a Table widget with the DataFrame
table = table.Table(
    data=data,
    columns=["name", "age"],
)