[Python] How to hide dataframe index on streamlit?

Discussão em 'Python' iniciado por Stack, Março 19, 2025.

  1. Stack

    Stack Membro Participativo

    I want to use some pandas style resources and I want to hide table indexes on streamlit.

    I tryed this:

    import streamlit as st
    import pandas as pd


    table1 = pd.DataFrame({'N':[10, 20, 30], 'mean':[4.1, 5.6, 6.3]})
    st.dataframe(table1.style.hide_index().format(subset=['mean'],
    decimal=',', precision=2).bar(subset=['mean'], align="mid"))


    but regardless the .hide_index() I got this:

    [​IMG]

    Ideas to solve this?

    Continue reading...

Compartilhe esta Página