Delete eda.py
Browse files
eda.py
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
import pandas as pd
|
3 |
-
import joblib
|
4 |
-
|
5 |
-
st.header('Grade Challange 3')
|
6 |
-
st.title('Exploratory Data Analysis')
|
7 |
-
st.write("""
|
8 |
-
Created by Wawan Setiawan S
|
9 |
-
""")
|
10 |
-
|
11 |
-
@st.cache
|
12 |
-
def fetch_data():
|
13 |
-
df = pd.read_csv('h8dsft_P1G3_Wawan_Setiawan.csv')
|
14 |
-
df['anaemia'] = df['anaemia'].replace({0: 'no', 1 : 'yes'})
|
15 |
-
df['diabetes'] = df['diabetes'].replace({0 : 'no', 1: 'yes'})
|
16 |
-
df['high_blood_pressure'] = df['high_blood_pressure'].replace({0 : 'no', 1: 'yes'})
|
17 |
-
df['smoking'] = df['smoking'].replace({0 : 'no', 1: 'yes'})
|
18 |
-
df['sex'] = df['sex'].replace({0 : 'female', 1: 'male'})
|
19 |
-
df['DEATH_EVENT'] = df['DEATH_EVENT'].astype(float)
|
20 |
-
return df
|
21 |
-
|
22 |
-
df = fetch_data()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|