-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecordAttributes.py
More file actions
31 lines (25 loc) · 843 Bytes
/
Copy pathrecordAttributes.py
File metadata and controls
31 lines (25 loc) · 843 Bytes
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
import sys
from collections import defaultdict
class RecordAttributes(object):
def __init__(self):
self.workClass = defaultdict(int)
self.maritialStatus = defaultdict(int)
self.occupation = defaultdict(int)
self.relationship = defaultdict(int)
self.race = defaultdict(int)
self.sex = defaultdict(int)
self.averageAge = 0
self.averageEducation = 0
self.capitalGain = 0
self.averageCapitalGain = 0
self.capitalLoss = 0
self.averageCapitalLoss = 0
self.hoursPerWeek = 0
self.averageHoursPerWeek = 0
self.averageWorkClass = 0
self.averageMaritialStatus = 0
self.averageOccupation = 0
self.averageRelationship = 0
self.averageRace = 0
self.averageSex = 0
self.count = 0