Version 1.42.0

Highlights

Notable Changes

Other Changes

  • :pushpin: Dataframes have column menus for users to sort and pin columns (#10206).
  • :vertical_traffic_light: Dataframes support categorical indices (#9647, #10195).
  • :flying_saucer: Dataframes show a hover highlight on rows (#8096, #10104).
  • :warning: When dataframes have cell values that are inconsistent with their configured type, Streamlit shows a tooltip describing the error (#8253, #9899).
  • :curly_loop: If there is an existing asyncio event loop when a Streamlit app starts, the app will reuse it instead of creating a new one (#10164). Thanks, DeltaGa!
  • :framed_picture: Streamlit recognizes pyspark.sql.connect.dataframe.DataFrame objects as dataframes (#9953, #9954). Thanks, OSalama!
  • :smiley: We’ve updated emoji validation for new emojis (#10149).
  • :symbols: Material Symbols have been updated with the latest icons (#10247).
  • :nail_care: Visual tweaks and improvements (#8705, #9823, #10047, #10048, #10083, #10087, #10225).
  • :o: st.image displays rounded corners for consistent design (#9999).
  • :tophat: Bug fix: Top margin is applied correctly in st.columns (#10265, #10268).
  • :poop: Bug fix: react-syntax-highlighter is aliased to prevent rendering errors in st.code (#10231, #10244).
  • :broom: Bug fix: We improved error messages for st.query_params (#10111, #10237).
  • :worm: Bug fix: Linting for st.altair_chart recognizes all Altair chart types (#10202).
  • :arrow_upper_right: Bug fix: st.dataframe supports raw Arrow data (#5606, #10191).
  • :snake: Bug fix: st.navigation and st.page_link work when running in pure Python tests (#10163).
  • :skull_and_crossbones: Bug fix: Retries were added to prevent a possible race condition when files are removed while Streamlit is running (#10148).
  • :alien: Bug fix: When printing an app, st.logo will only print once (#10165, #10171).
  • :earth_africa: Bug fix: Material icons are marked to prevent translation (#10168, #10174).
  • :ghost: Bug fix: st.vega_lite_chart correctly caches and updates its data (#6689, #10125).
  • :crab: Bug fix: When a fragment ID is not found, Streamlit logs a warning but doesn’t raise an error (#9921, #10130).
  • :butterfly: Bug fix: The label on st.expander correctly fades when stale (#10085).
  • :lizard: Bug fix: st.date_input provides better type hinting for its return value (#9477, #9620). Thanks, pranaybattu!
  • :snail: Bug fix: In dataframes, small float values display their first significant figure instead of displaying as 0 (#10060).
  • :spider_web: Bug fix: When rich is installed, errors are only logged once. (#10097).
  • :cricket: Bug fix: st.text preserves whitespace (#10055, #10062).
  • :scorpion: Bug fix: Dataframe width is not ignored when height is changed (#9762, #10036).
  • :mosquito: Bug fix: Multi index columns correctly handle empty labels (#9749, #10035).
  • :microbe: Bug fix: Pinned columns respect column_order in when configured in st.dataframe (#9997, #10034).
  • :fly: Bug fix: Tooltips don’t overflow to the left or right (#9288, #9452, #9983).
  • :cockroach: Bug fix: Disabled feedback widgets correctly show their value (#10030).
  • :spider: Bug fix: Widgets correctly submit values if a user edits the value and immediately clicks a button (#10007, #10018).
  • :lady_beetle: Bug fix: Some MIME types have been hardcoded to protect against browser misconfiguration (#10004, #10010).
  • :honeybee: Bug fix: Files that unnecessarily inflated Streamlit’s installation size were removed (#10008, #10011).
  • :ant: Bug fix: st.date_input gives the correct type hint for the value parameter (#10005, #10006).
  • :beetle: Bug fix: st.write passes to st.html when ._repr_html() is present for an object (#9910).
  • :bug: Bug fix: st.html preserves target=_blank if set in an HTML string (#9972, #9994).
13 Likes

Excited to start testing with OpenID.

2 Likes

It would be great is for st.logout() can also pass a URL that we want to redirect to. Now it only goes to /auth/logout and for Azure auth it needs to be /.auth/logout.

Thanks!

Now its impossible to show styled dataframes with st.table?

@mick76 Do you have an example of styled dataframes not working anymore?

Hi, sorry for my late answer.

Here is my example code:

def redgreen(x):
    style_lt = "background-color: lightgreen; color: black; font-weight: normal;"
    style_gt = "background-color: orangered; color: black; font-weight: normal;"
    is_negative = x < 200
    return [style_gt if i else style_lt for i in is_negative]

index_names = {'selector': 'th,td', 'props': [('font-style', 'normal'), ('font-weight', 'bold'), ('font-size', '12px')]}
properties = {'border': '2px solid black', 'color': 'black', 'font-size': '12px', 'text-align': 'right', 'font-weight': 'bold'}
df_styled = df.style.set_table_styles([index_names])\
              .set_properties(**properties)\
              .apply(redgreen, subset=['Price'])\
              .format({
                 "Strike": "${:.2f}",
                 "Price": "${:,.2f}",
                 "opt. price": "${:.2f}",
                 "Entry": "${:,.2f}"})\
              .hide(axis="index")

col1, col2 = st.columns(2)

with col1:
   st.table(df_styled)

Streamlit 1.41.1:

Streamlit 1.43:

@mick76 It looks like most of the style is coming through correctly. Is it just font weight that stopped working for you?

That seems to be the case.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.