Version 1.19.0

Highlights

  • :scissors: Introducing st.experimental_data_editor, a widget that allows you to edit DataFrames and many other data structures in a table-like UI. Read more in our documentation and blog post.

Other Changes

  • :sparkles: Streamlit’s GitHub README got a new look (#6016).
  • :new_moon_with_face: Improved readability of styled dataframe cells in dark mode (#6060, #6098).
  • :bug: Bug fix: make apps work again in the latest versions of Safari, and in Chrome with third-party cookies blocked (#6092, #6094, #6087, #6100).
  • :lady_beetle: Bug fix: refer to new cache primitives in the “Clear cache” dialog and error messages (#6082, #6128).
  • :honeybee: Bug fix: properly cache class member functions and instance methods (#6109, #6114).
  • :ant: Bug fix: regression in st.metric tooltip position (#6093, #6129).
  • :beetle: Bug fix: allow fullscreen button to show for dataframes, charts, etc, in expander (#6083, #6148).
17 Likes

Thanks!

Sounds good!

Do you know if there are any plans to work on Display clickable links in st.dataframe or st.table · Issue #983 · streamlit/streamlit · GitHub anytime soon? st.dataframe keeps getting better and better but I am stuck on streamlit_aggrid until that one is solved.

Awesome, we needed an easy-to-use grid editor. Hopefully, cell dropdowns will come soon. :slight_smile:

Cheers

experimental_data_editor is very exciting!

But unfortunately not working for me. When I’m just using the example code (and example dataframe) from the documentation I get “TypeError: data type ‘complex256’ not understood”.

Interestingly I get the same error triggered by st.write(df.dtypes). Seems to be a problem in streamlit\type_util.py, line 653, in is_colum_type_arrow_incompatible.

Might be something to do with my setup though.

Oh, this sounds like an issue with dependencies. Can you check which numpy and pandas version you have?

Awesome, we needed an easy-to-use grid editor. Hopefully, cell dropdowns will come soon. :slight_smile:

Cell dropdowns are already in the release, but they only get activated for columns with the categorical type (see here).

1 Like

It’s already in work; we will release an URL column type soon. Is your requirement just to have clickable URL’s in the cells?

pandas 1.1.5
numpy 1.21.6

1 Like

Great to hear! Yes, basically, hopefully with a way to set the display name / icon and the _target attribute.

Thanks! It would be very helpful if you could report it here as an issue with the exception and the snippet you used. This sounds like something that might need a fix asap: Issues · streamlit/streamlit · GitHub

1 Like

4 posts were split to a new topic: Streamlit and Google API client protobuf version

Is there any ability to hide the index column? I noticed this is possible with markdown for st.table but not st.dataframe for streamlit versions >1.10, and it doesn’t appear available for this either? Thanks, trying to make pretty tables for client :slight_smile: .

P.S. would love the functionality to limit the users ability to manipulate data by column. For example if I want user to be able select a checkbox in a new column as shown in the release example, BUT not allow them to accidentally manipulate any other data, which IMO is easy to do when playing around with this.

Thanks!

1 Like

Perfect! We have been waiting for this update for a while. After a quick try with my application, I have some questions:

1. It has already been asked in the comments; however, I want to remind you. Is it possible to delete the indexing column since we can add custom indexing?
2. Is there a way to set the total width to the page width so that the column widths are arranged accordingly?
3. Is it possible to colorize the cell background or cell edge?

Best.

I see you guys showing these effect.


So how to display widgets in st.experimental_data_editor, could you write a demo? I didn’t find a way to do it in any docs.

2 Likes

Setting data_editor to dynamic shows one of the features that i was looking for which is a selectable checkbox. but it seems that it is only useful for editing the table. i would like to be able to get information from the rows selected as in aggrid.

I added a column with checkbox starting with all values False. Then once user checks certain boxes you can subset the edited data frame where the value of that column is now True. I think this is an example of what you’re asking for.

Spoiler alert! Apparently, when updating our docs @snehankekre scooped a secret feature that’s coming soon :smiley:

So the answer is: you can’t do that today but, if you want to be pleasantly surprised, just wait a couple of releases. @jrieke and @lukasmasuch are working on it!

3 Likes

Here’s a hack (if you are using data frames) to get rid of the index column in the display, by first setting the index to a new index column I want, then resetting the index after to get back to my original data frame (but now with user edits). I think it could work if you are wanting to customize index, but it definitely depends on the type of data you are showing. It works for me without breaking downstream code that uses the edited df and looks much better in display.
Example:
df = df.set_index(‘New Index Column’)
edited_df = st.experimental_data_editor(df)
edited_df = edited_df.reset_index()

Also use_container_width=True is a parameter option which I think answers your 2nd question?

1 Like