data_editor in vertical orientation?

This is likely an oddball request, but I have a data frame that has many columns but few rows.

If it’s possible, it would give a better UX if I could use the editor oriented with rows horizontally and columns vertically. I can’t just transpose the DataFrame because the acceptable values are still controlled by the columns, and not the rows. I would just like the UI to be transposed, not the DataFrame.

Likely this is impossible, but if anyone has done something like this, I would be grateful to hear about it.

TIA

This is a common use-case for me too. Unfortunately I don’t think there is a workaround because pandas fundamentally assumes each column has the same type. The fix would have to be on the streamlit side when it renders the dataframe.

We almost just need a transposeargument to st.data_editorwhich “flips” the dataframe before visualising.