Data Frame Column and Row İndex Color Changing Problem in Streamlit

Hello, Is there a way to change the data frame row (index) and column name text color? Additionally, how do I change the width of the data frame?

    max_purchasing.rename(columns = {'count_of_purchase/campaign':'max_count_of_purchase/campaign'}, inplace = True)
    #print("max number of purchasing/campaign frequency:\n\n",max_purchasing)
# only valid for values
 st.markdown('<style>div[class="css-o1jpvw e19lei0e1"] { color: black; background:white;font-weight: normal; } .data:hover{ background:cyan;)}</style>', unsafe_allow_html=True) 

# this is not working

Hi @murat_tasci,

Thanks for posting!

For the width/height, there is an open issue with setting dataframe width – I’ll bring this up to our team and see if we can get an estimate on when it will be resolved. In the meantime, you can use st._legacy_dataframe or st.table to avoid this bug.

For the styling part of your question, heck out this example from our documentation:

You can also pass a Pandas Styler object to change the style of the rendered DataFrame:

df = pd.DataFrame(
    np.random.randn(10, 20),
    columns=('col %d' % i for i in range(20)))


Caroline :balloon: