Skip to main content

PyPI version

Welcome to the streamlit-excel package!

This package provides a Streamlit component for filtering large pandas DataFrames (e.g., over 100,000 rows) through an intuitive, Excel-like interface. It enables interactive filtering directly within a Streamlit app, allowing users to explore and refine data visually and efficiently.

Designed for simplicity and seamless integration, the component is ideal for data scientists and developers building interactive data visualizations.

Key Features

  • Easy Integration: Initialize the component with a Pandas DataFrame using the Table class and store it in the session state.
  • Flexible Filtering: Use Table.show_filter_widget to render a filter widget for specific columns. The widget can be placed anywhere in the app, including the sidebar.
  • Dynamic Views: Access the filtered DataFrame via the Table.view property.
  • Multiple Tables: Support for multiple tables by creating separate Table instances with unique key parameters.
  • Custom Column Names: Customize display names in the filter widget by passing a dictionary to the mapper parameter when creating the Table instance.

Installation

$ pip install streamlit-excel streamlit pandas

Usage

Below is a simple example demonstrating how to use the streamlit-excel package to create a filterable table in a Streamlit app. In this example, we generate a random dataset with 100,000 rows and 5 columns to showcase the package's scalability.

Save the following code to app.py:

import streamlit as st
import streamlit_excel
import pandas as pd
import numpy as np
import random
from datetime import datetime

if "example_table" not in st.session_state:
    n = 100000
    df = pd.DataFrame({
        "Name": np.random.choice(["Emily Johnson", "Michael Smith", "Lena Corwin", "Talia Vexley", "Kai Renford"], n),
        "City": np.random.choice(["Kyoto", "Cape Town", "Vancouver", "New York City", "Paris"], n),
        "Color": np.random.choice(["Red", "Green", "Yellow", "Blue"], n),
        "Start": [datetime(random.randint(1999, 2022), random.randint(1, 12), random.randint(1, 28)) for _ in range(n)],
        "End": [datetime(random.randint(2023, 2025), random.randint(1, 12), random.randint(1, 28)) for _ in range(n)],
    })
    st.session_state.example_table = streamlit_excel.Table(df, "example_table")

st.session_state.example_table.show_filter_widget("Example Table", ["Name", "City", "Color", "Start", "End"])
st.dataframe(st.session_state.example_table.view)
st.dataframe(st.session_state.example_table.view.describe(include="all"))

Run the app:

$ streamlit run app.py

Metadata

Release files for streamlit-excel 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-excel 0.0.2
File Size Uploaded Provenance
streamlit-excel-0.0.2.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-excel 0.0.2
File Interpreter ABI Platform
streamlit_excel-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / streamlit-excel-0.0.2.tar.gz

Download URL streamlit-excel-0.0.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5b177d362641574fcf0ea117998edabb6b6426cdce3035bf64861495891eedf9
BLAKE2b-256 checksum
How to use checksums
5edaa2744a652c6caaac3583b8b90f29af44aa1ab0204e6b4b7ff4400cafd374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Release files / streamlit_excel-0.0.2-py3-none-any.whl

Download URL streamlit_excel-0.0.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
305079cf8ab95b00810420f6b291ee80288a809c2de5e61163cdd6ad523d090e
BLAKE2b-256 checksum
How to use checksums
251e6827696a60b48e285d596e82dfa7214921da329239482eabfe29eeac135e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Security for streamlit-excel 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page