Highlights
-
Announcing the general availability of st.data_editor, a widget that allows you to edit DataFrames and many other data structures in a table-like UI. Breaking change: the data editor’s representation used in
st.session_state
was altered. Find out more about the new format in Access edited data. -
Introducing the Column configuration API with a suite of methods to configure the display and editing behavior of
st.dataframe
andst.data_editor
columns (e.g. their title, visibility, type, or format). Keep an eye out for a detailed blog post and in-depth documentation upcoming in the next two weeks. -
Learn to use
st.experimental_connection
to create and manage data connections in your apps with the new Connecting to data docs and video tutorial.
Notable Changes
- Streamlit now supports Protobuf 4 and Altair 5 (#6215, #6618, #5626, #6622).
-
st.dataframe and st.data_editor can hide index columns with
hide_index
, specify the display order of columns withcolumn_order
, and disable editing for individual columns with thedisabled
parameter. -
The
ttl
parameter in st.cache_data and st.cache_resource accepts formatted strings, so you can simply sayttl="30d"
,ttl="1h30m"
and any other combination ofw
,d
,h
,m
,s
supported by Pandas’s Timedelta constructor (#6560). -
st.file_uploader
now interprets thetype
parameter more accurately. For example, “jpg” or “.jpg” now accept both “jpg” and “jpeg” extensions. This functionality has also been extended to “mpeg/mpg”, “tiff/tif”, “html/htm”, and “mpeg4/mp4”. -
The new
global.disableWidgetStateDuplicationWarning
configuration option allows the silencing of warnings triggered by setting widget default values and keyed session state values concurrently (#3605, #6640). Thanks, @antonAce!
Other Changes
- Improved startup time by lazy loading some dependencies (#6531).
-
Removed
st.beta_*
andst.experimental_show
due to deprecation and low-use (#6558) -
Further improvements to st.dataframe and st.data_editor:
- Improved editing on mobile devices for the data editor (#6548).
- All editable columns have an icon in their column header and support tooltips (#6550, #6561).
- Enable editing for columns containing datetime, date, or time values (#6025).
- New input validation options for columns in the data editor, such as
max_chars
andvalidate
for text columns, andmin_value
,max_value
andstep
for number columns (#6563). - Improved type parsing capabilities in the data editor (#6551).
- Unified missing values to
None
in returned data structures (#6544). - A warning is shown in cells when integers exceed the maximum safe value of
(2^53) -1
(#6311, #6549). - Prevented editing the sessions state by showing a warning (#6634).
- Fixed issues with list columns sometimes breaking the frontend (#6644).
- Fixed a display issue with index columns using category dtype (#6680, #6598).
- Fixed an issue that prevented a rerun when adding empty rows (#6598).
- Unified the behavior between
st.data_editor
andst.dataframe
related to auto-hiding the index column(s) based on the input data (#6659, #6598)
- Streamlit’s Security Policy can be found in its GitHub repository (#6666).
-
Documented the integer size limit for
st.number_input
andst.slider
(#6724). - The majority of Streamlit’s Python dependencies have set a maximum allowable version, with the standard upper limit set to the next major version, but not inclusive of it (#6691).
- UI design improvements to in-app modals (#6688).
-
Bug fix:
st.date_input
’s date selector is equally visible in dark mode (#6072, #6630). - Bug fix: the sidebar navigation expansion indicator in multipage apps is restored (#6731).
-
Bug fix: The docstring and exception message for
st.set_page_config
have been updated to clarify that this command can be invoked once for each page within a multipage app, rather than once per entire app (#6594). -
Bug fix:
st.json
no longer collapses multiple spaces in both keys and values with single space when rendered (#6657, #6663).