Skip to main content

Alternative to `st.table` with configuration displaying Pandas DataFrame

Project description

Streamlit dataframe display

alternative to st.table with configuration displaying Pandas DataFrame

PyPI - Version PyPI - License PyPI - Downloads PyPI - Implementation PyPI - Wheel PyPI - Format PyPI - Python Version

Installation instructions

pip install st-df-table

Usage instructions

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)

table-1

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",
)

table-2

st_table(
    df,
    head_align="right",
    data_align="right",
    data_bg_color="green",
    data_color="yellow",
    data_font_weight="bold",
    bordered=False,
    sortable=False,
)

table-3

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",
)

table-4

Cloud example

https://mysiar-org-st-table-st-df.streamlit.app/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st_df_table-0.0.7.tar.gz (677.4 kB view details)

Uploaded Source

Built Distribution

st_df_table-0.0.7-py3-none-any.whl (682.6 kB view details)

Uploaded Python 3

File details

Details for the file st_df_table-0.0.7.tar.gz.

File metadata

  • Download URL: st_df_table-0.0.7.tar.gz
  • Upload date:
  • Size: 677.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for st_df_table-0.0.7.tar.gz
Algorithm Hash digest
SHA256 6f6f410c9b86df48eba4d8e692d76dc1003cd1b08222e41e1503a8e747056833
MD5 3d7fe51312c81358498dca517cbf0067
BLAKE2b-256 4145cc686b4fccc9d2e04d6c06b6e18d1aa9a37bc7257900f59f7abc053c470e

See more details on using hashes here.

File details

Details for the file st_df_table-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: st_df_table-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 682.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for st_df_table-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 04a3b20574abbfedc21104101038a64340a64c15d3cf3ff8d9bb5ce41428900e
MD5 846ef561dac471732eebe292b24d8726
BLAKE2b-256 722034446cf06a7367548bf705ed20dce85748252c583bfc5adbb1985308ed4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page