File size: 604 Bytes
afb5018 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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('imput 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) |