πΒ Β Dataframe explorer UI
Submitted by Streamlit Data Team!
Summary
Let your viewers explore dataframes themselves! Learn more about it on this blog post
Functions
dataframe_explorer
Adds a UI on top of a dataframe to let viewers filter columns
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
Original dataframe |
required |
case |
bool
|
If True, text inputs will be case sensitive. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: Filtered dataframe |
Source code in src/streamlit_extras/dataframe_explorer/__init__.py
Import:
- You should add this to the top of your .py file
Examples
example_one
def example_one():
dataframe = generate_fake_dataframe(
size=500, cols="dfc", col_names=("date", "income", "person"), seed=1
)
filtered_df = dataframe_explorer(dataframe, case=False)
st.dataframe(filtered_df, use_container_width=True)