Skip to main content

Table

Display a pandas dataframe to the user

Examples

Basic Example

The following example demonstrate some of the available functionality for display_pandas

import pandas as pd
from abstra.forms import display_pandas

df = pd.DataFrame.from_dict(
{
"A": [1, 2, 3, 4],
"B": [5, 6, 7, 8],
"C": [9, 10, 11, 12],
}
)

display_pandas(df)

Parameters

NameDescriptionType
dfThe dataframe to display to the user"DataFrame"
display_indexWhether to show a index column. Defaults to False.bool
labelThe label to display to the userstr
page_sizeThe number of rows to display per page. Defaults to 10.number
full_widthWhether the input should use full screen width. Defaults to True.bool
actionsActions that can be triggered by table rowslist
end_programWhether the program should end after the widget is shown. Defaults to False.bool
button_textWhat text to display on the button when the widget is not part of a Page. Defaults to 'Next'.str