Skip to content

Commit dc3ab78

Browse files
authored
Add Streamlit app to display styled DataFrame
1 parent 7274492 commit dc3ab78

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

issues/gh-6706/app.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import streamlit as st
2+
import pandas as pd
3+
4+
df = pd.DataFrame({
5+
'A':[1,2,3,4],
6+
'B':[1111,2,33,44444],
7+
'C':[1,2,3,4]
8+
})
9+
10+
styled_df = df.style.set_properties(**{
11+
"background-color": "white",
12+
"color": "black",
13+
"border-color": "black",
14+
'text-align': 'center'
15+
})
16+
17+
st.dataframe(styled_df)
18+
st.table(styled_df)

0 commit comments

Comments
 (0)