File size: 454 Bytes
0074cb1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
import plotly.express as px
import pandas as pd

# DONE Test streamlit 
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)

# Test plotly plotting
# Create a sample dataframe
df = pd.DataFrame({'x': [1, 2, 3, 4], 'y': [10, 20, 30, 40], 'z': ['A', 'B', 'C', 'D']})

# Plot a scatter plot using x, y columns
fig = px.scatter(df, x='x', y='y')

# Show it through streamlit
st.plotly_chart(fig, use_container_width=True)