Hello, Kevin! You are 25 years old.
A | B | C |
---|---|---|
0.17 | -0.57 | 1.22 |
-0.47 | 1.11 | -0.34 |
0.33 | -0.88 | 0.45 |
-1.12 | 1.34 | -0.76 |
1.02 | 0.66 | 0.99 |
#!/usr/bin/env python
import streamlit as st
import pandas as pd
import numpy as np
# Title of the app
st.title("Streamlit App")
# Text input box
user_name = st.text_input("Enter your name", "Kevin")
# Slider input
age = st.slider("Select your age", 1, 100, 25)
# Display user input
st.write(f"Hello, {user_name}! You are {age} years old.")
# Generate sample data
chart_data = pd.DataFrame(
np.random.randn(20, 3),
columns=["A", "B", "C"]
)
# Display a line chart
st.line_chart(chart_data)