abdouramandalil commited on
Commit
4f7298b
1 Parent(s): f38bc5c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import numpy as np
3
+ import pandas as pd
4
+ import matplotlib.pyplot as plt
5
+ import seaborn as sns
6
+
7
+ st.title('File Uploader')
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
+ sns.scatterplot(x='EstimatedSalary',y='Age',hue='Purchased',data=df)
19
+ st.pyplot(fig1)
20
+ with col2:
21
+ fig2 = plt.figure()
22
+ sns.histplot(df.Age)
23
+ st.pyplot(fig2)