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.8.tar.gz (676.7 kB view details)

Uploaded Source

Built Distribution

st_df_table-0.0.8-py3-none-any.whl (681.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_df_table-0.0.8.tar.gz
  • Upload date:
  • Size: 676.7 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.8.tar.gz
Algorithm Hash digest
SHA256 6fa8477bec8e687537e761d49d4144841699a60fc2a6a7441b91d09f8b3a8b99
MD5 b2328892bca24b7aa5d5574e9a4793b5
BLAKE2b-256 6eae862810acc74a8ad86b80006384489cfb034680cb810bfb99c9ee3e9ecf3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: st_df_table-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 681.8 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 221e57a75ec194ae1a20d6364300ba5e88409dcfee4121fe36d3b63954008eac
MD5 1ef5da3afc51a58a4f3158e7410489f7
BLAKE2b-256 7caec9e9f706d6837f0a5f63b3b41955ff442e8d1a5d8018defedb03c41cf176

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