Is it possible to merge cells of the rows of a dataframe with MultiIndex in the rows rather than the columns (which as of a recent update works great)? The following code displays a dataframe and its transpose.
import streamlit as st
import pandas as pd
df = pd.DataFrame(
[[1, 2, 3], [4, 5, 6], [7, 8, 9]],
columns=pd.MultiIndex.from_tuples([('a', 1), ('a', 2), ('b', 1)])
)
st.code("st.dataframe(df)")
st.dataframe(df)
st.code("st.dataframe(df.T)")
st.dataframe(df.T)
We see that it correctly merges the MultiIndex labels for the columns but fails to do so on the rows when we display the transpose. Is there a way around this or is it planned for a future update?