-
Notifications
You must be signed in to change notification settings - Fork 0
/
response_class.py
166 lines (111 loc) · 3.31 KB
/
response_class.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
from typing import Pattern
from openpyxl import Workbook
from openpyxl import load_workbook
from openpyxl.styles import colors
from openpyxl.styles.colors import Color
from openpyxl.styles import Font
from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font
from openpyxl.utils import get_column_letter
import os
datawb = load_workbook("CondomSurvey.xlsx")
data = datawb.active
class Response:
def __init__(self, row):
self.row = row
self.id = None
self.completeness = None
self.sf = None
self.cuf = None
self.asp = None
self.ppc = None
self.sti = None
self.confidence = None
self.lucnp = None
self.poce = None
self.ecn = None
self.wnc = []
self.ped = None
self.itp1 = None
self.rfi1 = []
self.rfn1 = []
self.itp2 = None
self.rfi2 = []
self.rfn2 = []
self.aa = None
self.explainwhy = None
self.age = None
self.country = None
self.rs = None
self.gi = None
self.trans = None
self.so = None
self.race = []
self.econ = None
self.god = None
self.dis = None
self.disabilities = []
def setid(self, id1):
self.id = id1
def setcompleteness(self, completeness):
self.completeness = completeness
def setsf(self, sf):
self.sf = sf
def setcuf(self, cuf):
self.cuf = cuf
def setasp(self, asp):
self.asp = asp
def setppc(self, ppc):
self.ppc = ppc
def setsti(self, sti):
self.sti = sti
def setconfidence(self, confidence):
self.confidence = confidence
def setlucnp(self, lucnp):
self.lucnp = lucnp
def setpoce(self, poce):
self.poce = poce
def setecn(self, ecn):
self.ecn = ecn
def setwnc(self, wnc):
self.wnc.append(wnc)
def setped(self, ped):
self.ped = ped
def setitp1(self, applicatorinterest):
self.itp1 = applicatorinterest
def setrfi1(self, applicatorreason):
self.rfi1.append(applicatorreason)
def setfrn1(self, noapplicatorreason):
self.rfn1.append(noapplicatorreason)
def setitp2(self, mlcinterest):
self.itp2 = mlcinterest
def setrfi2(self, mlcreason):
self.rfi2.append(mlcreason)
def setrfn2(self, nomlcreason):
self.rfn2.append(nomlcreason)
def setaa(self, aa):
self.aa = aa
def setexplainwhy(self, explainwhy):
self.explainwhy = explainwhy
def setage(self, age):
self.age = age
def setcountry(self, country):
self.country = country
def setrs(self, rs):
self.rs = rs
def setgi(self,gender):
self.gi = gender
def settrans(self, transgender):
self.trans = transgender
def setso(self, so):
self.so = so
def setrace(self, race):
self.race.append(race)
def setecon(self, economic):
self.econ = economic
def setgod(self, god):
self.god = god
def setdis(self, disabled):
self.dis = disabled
def setdisabilites(self, disability):
self.disabilities.append(disability)
pass