Desiree9 commited on
Commit
50ce090
1 Parent(s): 003124d
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+ import matplotlib.pyplot as plt
5
+ import seaborn as sns
6
+
7
+ st.title("file upload")
8
+ st.subheader('input csv')
9
+ uploaded_file =st.file_uploader('upload a csv')
10
+
11
+ if uploaded_file is not None:
12
+ df=pd.read_csv(uploaded_file)
13
+ st.subheader('dataframe')
14
+ st.write(df)
15
+ col1,col2 =st.columns(2)
16
+ with col1:
17
+ fig1 = plt.figure()
18
+
19
+ sns.scatterplot(x='EstimatedSalary', y='Age', hue='Purchased', data=df)
20
+ st.pyplot(fig1)
21
+ with col2:
22
+ fig2 =plt.figure()
23
+ sns.histplot(df.Age)
24
+ st.pyplot(fig2)