alternative to st.table
with configuration displaying Pandas DataFrame
pip install st-df-table
import pandas as pd
from st_df_table import st_table
data = {
"Column A": [1, 2, 3, 4, 5, 6],
"Column C": [True, False, True, False, True, False],
"Column B": ["A", "B", "C", "F", "G", "H"],
}
df = pd.DataFrame(data)
st_table(df)
st_table(
df,
head_align="left",
data_align="left",
head_bg_color="red",
head_color="blue",
head_font_weight="normal",
border_color="red",
border_width="3",
)
st_table(
df,
head_align="right",
data_align="right",
data_bg_color="green",
data_color="yellow",
data_font_weight="bold",
bordered=False,
sortable=False,
)
import string
import numpy as np
import pandas as pd
from st_df_table import st_table
df = pd.DataFrame(
{
"Column A": list(range(1, 101)),
"Column B": np.random.choice(list(string.ascii_uppercase), size=100),
"Column C": np.random.rand(100),
}
)
st_table(
df,
border_width=4,
border_color="red",
paginated=True,
pagination_size_per_page=7,
pagination_bar_size=4,
pagination_text_color="blue",
pagination_bg_color="yellow",
pagination_border_color="green",
pagination_active_color="yellow",
)