Split a table cell into 2 columns

Summary

I would like to split one of the table headers into 2 sub-headers. The below link has a similar question, done in html.
(css - Splitting a table cell into two columns in HTML - Stack Overflow)

Steps to reproduce

Code snippet:
I use the below code to pretty the dataframe. However I cant find a way yet to create sub-header for one of the columns.

headers = {
    "selector": "th:not(.index_name)",
    "props": "background-color: #3B4759; color: #F2F2F2; text-align: center; border-color: #F2F2F2; border-left: 1px solid #F2F2F2 !important; width: 100%"
}
properties = {"border": "1px solid grey", "width": "100vw", "text-align": "center"}

st.markdown(opp_hihglight.style.hide(axis="index").set_table_styles([headers]).set_properties(**properties).to_html(), unsafe_allow_html=True)

Is there a way I can smoothly integrate the html/css way mentioned in the stack overflow question to streamlit?

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