File size: 602 Bytes
4f7298b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

st.title('File Uploader')
st.subheader('Input csv')
uploaded_file = st.file_uploader('Upload a CSV')

if uploaded_file is not None:
    df = pd.read_csv(uploaded_file)
    st.subheader('Dataframe')
    st.write(df)
    col1,col2 = st.columns(2)
    with col1:
        fig1 = plt.figure()
        sns.scatterplot(x='EstimatedSalary',y='Age',hue='Purchased',data=df)
        st.pyplot(fig1)
    with col2:
        fig2 = plt.figure()
        sns.histplot(df.Age)
        st.pyplot(fig2)