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_statewas 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.dataframeandst.data_editorcolumns (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_connectionto 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 thedisabledparameter. -
The ttlparameter 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,ssupported by Pandas’s Timedelta constructor (#6560). -
st.file_uploadernow interprets thetypeparameter 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.disableWidgetStateDuplicationWarningconfiguration 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_showdue 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_charsandvalidatefor text columns, andmin_value,max_valueandstepfor number columns (#6563). - Improved type parsing capabilities in the data editor (#6551).
- Unified missing values to
Nonein 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_editorandst.dataframerelated 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_inputandst.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_confighave 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.jsonno longer collapses multiple spaces in both keys and values with single space when rendered (#6657, #6663).