-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunitTest.py
55 lines (43 loc) · 977 Bytes
/
unitTest.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
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 17 11:59:23 2017
@author: Snowlaw
"""
# Unit Test Program
import titanicSurvival
'''
Test Import Data
'''
raw = import_raw_data('train.csv')
#print('raw\n', raw)
'''
Test Cleansing Data
'''
cleanRaw = clean_data(raw, 0)
print('cleanRaw\n', cleanRaw)
'''
Test report min max mean median mode std
'''
print_basic_stat(cleanRaw)
'''
Test Barplot
'''
#barPlot(pd.DataFrame({'a':[1 ,3, 5, 7, 7], 'b':[2, 4, 6, 8, 8]}), ['a','b'])
col_interest = ['Survived', 'Pclass', 'Sex', 'SibSp', 'Parch', 'Embarked']
barPlot(cleanRaw, col_interest)
'''
Test Histplot
'''
col_interest = ['Age', 'Fare']
histPlot(cleanRaw, col_interest, 10)
'''
Test Barplot Compare
'''
colname = ['Survived', 'Pclass', 'Sex', 'SibSp', 'Parch', 'Embarked']
barPlotCompare(cleanRaw, colname)
'''
Test Histplot Compare
'''
col_interest = ['Age', 'Fare']
histPlotCompare(cleanRaw, col_interest, 10)
#GG