📄 Streamlit DataFrame Paginator
A lightweight Streamlit component that displays a paginated table for large DataFrames.
This helps keep your Streamlit apps responsive by showing the data in manageable pages.
✨ Features
-
🔢 Pagination: Displays data with page navigation, improving usability for large DataFrames.
-
🌍 Multilingual Support: You can fully customize all pagination labels to any language, including Japanese. For example:
# Japanese labels = { "first": "最初", "prev": "前へ", "next": "次へ", "last": "最後", "displayed_record": "表示行数:" } # English labels={ "first": "First", "prev": "Previous", "next": "Next", "last": "Last", }
-
📊 Column Sorting: Users can click on any column header to sort the table by that column, toggling between ascending and descending order.
-
↔️ Horizontal Scrolling: If the DataFrame contains many columns, horizontal scrolling is enabled, so you can easily view all data without layout issues.
Installation
pip install st_dataframe_paginator
Usage
import streamlit as st
from st_dataframe_paginator import st_dataframe_paginator
import pandas as pd
# Example DataFrame
df = pd.DataFrame({
"Name": ["Alice", "Bob", "Charlie", "David", "Eve", "Frank", "Grace", "Hank"],
"Score": [85, 92, 88, 70, 95, 60, 75, 90]
})
# Use the paginator
st_dataframe_paginator(
df,
page_size=3,
page_size_options=[3, 5, 10],
labels={
"first": "⏮️ First",
"prev": "◀️ Previous",
"next": "Next ▶️",
"last": "Last ⏭️",
},
key="st_paginator_1"
)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
data |
DataFrame | Required | The DataFrame to paginate |
page_size |
int | 10 |
Number of rows per page |
page_size_options |
list[int] | [10, 20, 50] |
Dropdown options for page size |
labels |
dict | Optional | Custom labels for navigation buttons |
key |
str or int | Optional | a unique identifier used to distinguish widgets and avoid conflicts when multiple elements of the same type are present |
Screenshot
Metadata
Release files for st-dataframe-paginator 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| st_dataframe_paginator-0.0.9.tar.gz | 125.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| st_dataframe_paginator-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 251.0 kB
Release files / st_dataframe_paginator-0.0.9.tar.gz
| Download URL | st_dataframe_paginator-0.0.9.tar.gz |
|---|---|
| Size | 125.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09887d5b98aff28ebae94011840a78eaa2e05a907e485d983b4ca3ce1799d4e1
|
|
BLAKE2b-256 checksum How to use checksums |
b785c3bb7ba9277dcd4d64b4e12df39cf7590c039ec30f1b4a166f6b8a27eb83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / st_dataframe_paginator-0.0.9-py3-none-any.whl
| Download URL | st_dataframe_paginator-0.0.9-py3-none-any.whl |
|---|---|
| Size | 126.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
712b18f6edb2cf4e4c1ddb7133081f85ad00579e2d56a01f5024de3f2c0d0fcc
|
|
BLAKE2b-256 checksum How to use checksums |
8204479691a379bfadf607f01dc1a869eba253c10ee16ce55255b1db60c7c15f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|