-
Notifications
You must be signed in to change notification settings - Fork 1
/
EDA_APP.py
86 lines (76 loc) · 3.83 KB
/
EDA_APP.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import numpy as np
import pandas as pd
import streamlit as st
from pandas_profiling import ProfileReport
from streamlit_pandas_profiling import st_profile_report
def main():
html_temp1 = """<div style="background-color:#6D7B8D;padding:10px">
<h4 style="color:white;text-align:center;">Exploratory data Analysis Application</h4>
</div>
<div>
</br>"""
st.markdown(html_temp1, unsafe_allow_html=True)
menu = ["Home", "EDA", "About"]
choice = st.sidebar.selectbox("Menu", menu, 2)
# for hide menu
hide_streamlit_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
</style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
st.sidebar.markdown(
""" Developed by Mohammad Juned Khan
Email : [email protected]
[LinkedIn] (https://www.linkedin.com/in/md-juned-khan)""")
if choice == "Home":
# color codes ff1a75 6D7B8D
html_temp2 = """<div style="background-color:#6D7B8D;padding:10px">
<h4 style="color:white;text-align:center;">This is the Exploratory data Analysis Application created using Streamlit framework and pandas-profiling library.</h4>
</div>
<div>
</br>"""
st.markdown(html_temp2, unsafe_allow_html=True)
elif choice == "EDA":
html_temp3 = """
<div style="background-color:#98AFC7;padding:10px">
<h4 style="color:white;text-align:center;">Upload file Your file in csv formate and perform Exploratory Data Analysis</h4>
<h5 style="color:white;text-align:center;">Make sure your columns have correct data types before uploading.</h5>
</div>
<br></br>"""
st.markdown(html_temp3, unsafe_allow_html=True)
st.subheader("Perform Exploratory data Analysis with Pandas Profiling Library")
data_file= st.file_uploader("Upload a csv file", type=["csv"])
if st.button("Analyze"):
if data_file is not None:
# Pandas Profiling Report
@st.cache
def load_csv():
csv = pd.read_csv(data_file)
return csv
df = load_csv()
pr = ProfileReport(df, explorative=True)
st.header('*User Input DataFrame*')
st.write(df)
st.write('---')
st.header('*Exploratory Data Analysis Report Using Pandas Profiling*')
st_profile_report(pr)
else:
st.success("Upload file")
else:
pass
# st.write("Check similarity of Resume and Job Description")
elif choice == "About":
html_temp4 = """
<div style="background-color:#98AFC7;padding:10px">
<h4 style="color:white;text-align:center;">This Application is developed by Mohammad Juned Khan using Streamlit Framework. If you're on LinkedIn and want to connect, just click on the link in sidebar and shoot me a request. You can also mail your comments. </h4>
<h4 style="color:white;text-align:center;">Thanks for Visiting</h4>
</div>
<br></br>
<br></br>"""
st.markdown(html_temp4, unsafe_allow_html=True)
else:
pass
if __name__ == "__main__":
main()