Install & Compatibility
Where this runs
tested against v1.2.1.post2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 3.058s · 479.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 15.4s · import 2.080s · 442MB
464MB installed
● package 464MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AgGrid
✓ from st_aggrid import AgGrid
GridOptionsBuilder
✓ from st_aggrid import GridOptionsBuilder
JsCode
✓ from st_aggrid import JsCode
AgGrid
✓ from st_aggrid import AgGrid
✗ from streamlit_aggrid import AgGrid
The package name is `streamlit-aggrid` but the import path is `st_aggrid`.
This quickstart example demonstrates how to display a Pandas DataFrame using `streamlit-aggrid` with basic interactivity, including editable columns and row selection. It uses `GridOptionsBuilder` for customization and retrieves the `selected_rows` and potentially `edited data` from the grid's response.
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid, GridOptionsBuilder, GridUpdateMode, DataReturnMode
st.set_page_config(layout='wide')
# Create a sample DataFrame
data = {
'col1': [1, 2, 3, 4, 5],
'col2': ['A', 'B', 'C', 'D', 'E'],
'col3': [10.1, 20.2, 30.3, 40.4, 50.5],
'col4': [True, False, True, False, True]
}
df = pd.DataFrame(data)
st.subheader('Basic Interactive AgGrid Table')
# Configure grid options
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_column('col1', header_name='Column One', editable=True)
gb.configure_column('col2', header_name='Column Two', editable=True)
gb.configure_selection(selection_mode='multiple', use_checkbox=True)
grid_options = gb.build()
# Display the AgGrid component
grid_response = AgGrid(
df,
gridOptions=grid_options,
data_return_mode=DataReturnMode.AS_INPUT,
update_mode=GridUpdateMode.MODEL_CHANGED,
fit_columns_on_grid_load=True,
height=350,
width='100%',
allow_unsafe_jscode=True, # Required for some advanced customizations like JsCode
enable_enterprise_modules=False # Set to True if using Ag-Grid Enterprise features and have a license
)
st.subheader('Selected Rows')
if grid_response['selected_rows']:
st.write(pd.DataFrame(grid_response['selected_rows']))
st.subheader('Edited Data (if any)')
if grid_response['data'] is not None:
st.write(grid_response['data'])
Debug
Known issues
deprecatedThe `try_to_convert_back_to_original_types` parameter has been deprecated since version 1.2.0. The grid now consistently attempts to maintain proper datatypes when editing data.fixRemove the `try_to_convert_back_to_original_types` parameter from your `AgGrid` calls. The library now handles type conversion automatically.
affects: >=1.2.0
breakingDirect HTML returns in `cellRenderer` functions stopped working with `Ag-Grid` version 29.1.0 (introduced in `streamlit-aggrid` 0.3.4).fixIf you were using direct HTML, you must now use `JsCode` for custom cell rendering to properly display content. Refer to the `streamlit-aggrid` examples for `JsCode` usage.
affects: >=0.3.4
gotcha`streamlit-aggrid` does not officially support Polars DataFrames, which can lead to 'no attribute kind' errors.fixConvert Polars DataFrames to Pandas DataFrames (e.g., `polars_df.to_pandas()`) before passing them to `AgGrid`.
affects: All versions
gotchaPerformance can degrade significantly with very large datasets (e.g., >1k rows) during extensive edits or sorting, as operations are primarily handled client-side.fixFor large datasets, consider using pagination, server-side data processing via `server_sync_strategy` (introduced in 1.2.0), or implement lazy loading. Store DataFrame in `st.session_state` and use `@st.cache_data` for better performance on app reruns.
affects: All versions
gotchaIf `AgGrid` is placed inside an `st.expander` or `st.form`, changes might not persist correctly across reruns without proper handling of Streamlit's session state and form submission.fixEnsure that the DataFrame displayed by `AgGrid` is stored in `st.session_state` and explicitly updated after interaction, especially when using `st.form` with a `form_submit_button`.
affects: All versions
breakingAn incompatibility issue occurred with Streamlit version 1.43.0, causing `streamlit-aggrid` to be unusable. This was resolved in `streamlit-aggrid` version 1.1.1.fixEnsure `streamlit-aggrid` is updated to version 1.1.1 or higher if you are using Streamlit 1.43.0 or later.
affects: Streamlit 1.43.0 (fixed in streamlit-aggrid >=1.1.1)
Upgrade
Version history
1.2.1.post2latest on PyPI · released Dec 29, 2025
Audit
Dependencies
pandasrequiredUsed for DataFrame manipulation, which is the primary data input for AgGrid.
streamlitrequiredThe core framework for which streamlit-aggrid is a component.
python-decoupleoptionalListed as a dependency in PyPI metadata, often used for configuration management.