Skip to content

Commit c34c2a7

Browse files
Prerelease 1.41.0 (#1195)
* Dataframe index configuration example * Column border example * Metric border example * Bump to nightly
1 parent d1b7050 commit c34c2a7

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import streamlit as st
2+
import pandas as pd
3+
from datetime import date
4+
5+
df = pd.DataFrame(
6+
{
7+
"Date": [date(2024, 1, 1), date(2024, 2, 1), date(2024, 3, 1)],
8+
"Total": [13429, 23564, 23452],
9+
}
10+
)
11+
df.set_index("Date", inplace=True)
12+
13+
config = {
14+
"_index": st.column_config.DateColumn("Month", format="MMM YYYY"),
15+
"Total": st.column_config.NumberColumn("Total ($)"),
16+
}
17+
18+
st.dataframe(df, column_config=config)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import streamlit as st
2+
3+
left, middle, right = st.columns(3, border=True)
4+
5+
left.markdown("Lorem ipsum " * 10)
6+
middle.markdown("Lorem ipsum " * 5)
7+
right.markdown("Lorem ipsum ")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import streamlit as st
2+
3+
a, b = st.columns(2)
4+
c, d = st.columns(2)
5+
6+
a.metric("Temperature", "30°F", "-9°F", border=True)
7+
b.metric("Wind", "4 mph", "2 mph", border=True)
8+
9+
c.metric("Humidity", "77%", "5%", border=True)
10+
d.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)

python/api-examples-source/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ pydeck
1111
Faker
1212
openai
1313
vega_datasets
14-
streamlit>=1.40.0
14+
streamlit-nightly

0 commit comments

Comments
 (0)