-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgramRun.py
More file actions
35 lines (27 loc) · 1.06 KB
/
Copy pathProgramRun.py
File metadata and controls
35 lines (27 loc) · 1.06 KB
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
import pandas as pd
import os
import sys
import warnings
import plotly.express as px
from FunctionLibrary import *
warnings.filterwarnings("ignore")
# Next 3 lines call clean_loandata function and save cleaned data to cleaned_function.csv
df = pd.read_csv(check_file('train.csv'))
df_clean = clean_loandata(df)
df_clean.to_csv('cleaned_function.csv', index = False)
df_cleaner= pd.read_csv(check_file('cleaned_function.csv'))
# Next 1 line call pie_chart function
pie_chart(df_cleaner, 'Loan_Status')
#Next 4 lines call bar_graph function
bar_graph(df_cleaner, 'Gender')
bar_graph(df_cleaner, 'Married')
bar_graph(df_cleaner, 'Education')
bar_graph(df_cleaner, 'Self_Employed')
# Next 1 line call histogram function
histogram(df_cleaner, 'ApplicantIncome')
# Next 2 lines call box_plot function
box_plot(df_cleaner, 'Loan_Status', 'ApplicantIncome')
box_plot(df_cleaner, 'Loan_Status', 'CoapplicantIncome')
# Next 2 lines call double_histogram function
double_histogram(df_cleaner, 'Credit_History', 'Loan_Status')
double_histogram(df_cleaner, 'Property_Area', 'Loan_Status')