st.table() in Streamlit

In Streamlit, st.table() is used to display static tabular data in a clean grid format. It renders a table exactly as provided — without scrolling, sorting, or interactivity. It is best suited for summaries, small datasets, and reports.

What is st.table()?

st.table() displays:

as a static table.

Basic Syntax

st.table(data)    

The function has the parameter data which specifies the data to display in table form.

Example 1: Display a DataFrame

Python

import streamlit as st
import pandas as pd

# Sample data
data = pd.DataFrame({
    "Name": ["Ashish", "Rahul", "Neha"],
    "Score": [85, 92, 78],
    "Grade": ["A", "A+", "B"]
})

st.title("Student Scores")

# Display static table
st.table(data)    

Output

The output of the above code is shown below:

Table in Streamlit

Example 2: Display Dictionary Data

Python

import streamlit as st

data = {
    "City": ["Delhi", "Mumbai", "Chennai"],
    "Temperature": [30, 32, 35]
}

st.table(data)    

✔ Streamlit converts dictionary → table automatically.

The output of the above code is shown below:

Table in Streamlit