i have some serial number in an excelsheet which being loaded into dataframe and then displayed st.dataframe(df_name), but the output comes as comma formated… but as its a serial number, i just to display it as number.
ex:
but I want display it as full number, with out comma’s and desimals
import streamlit as st
import pandas as pd
import numpy as np
df = pd.DataFrame(
{
"Serial Number": np.arange(1_000_000_000, 2_000_000_000, 100_000_000),
"Some number": np.arange(1, 2, 0.1)
}
)
cols = st.columns(2)
with cols[0]:
"## 🐻❄️ Default"
st.dataframe(df)
with cols[1]:
"## 😎 With style"
st.dataframe(
df.style.format({
"Serial Number": "{}", # Show no formatting
"Some number" : "{:.2f}" # Show a float with two decimals
})
)