File size: 641 Bytes
2097cb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import streamlit as st
import pandas as pd
import plotly.express as px


st.title("CSV File Upload and Display")

# File uploader
uploaded_file = st.file_uploader("Upload a CSV file", type=["csv"])

if uploaded_file:
    data = pd.read_csv(uploaded_file)
    st.write("Just loaded Data:")
    st.dataframe(data)
     # User selects x and y axes
    x_axis = st.selectbox("Choose X-axis:", data.columns)
    y_axis = st.selectbox("Choose Y-axis:", data.columns)
    # Generate scatter plot
    fig = px.scatter(data, x=x_axis, y=y_axis, title="Scatter Plot")
    st.plotly_chart(fig)