File size: 597 Bytes
7f77818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt


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("Line Chart Example:")
    st.line_chart(data)
    st.write("Bar Chart Example:")
    st.bar_chart(data)

    st.write("Custom Matplotlib Chart:")
    fig, ax = plt.subplots()
    ax.plot(data.iloc[:, 0], data.iloc[:, 1])
    ax.set_title("Custom Line Plot")
    st.pyplot(fig)