data_app / app.py
abdouramandalil's picture
Create app.py
4f7298b verified
raw
history blame
602 Bytes
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)