@@ -68,14 +68,21 @@ def create_main_frame(self):
68
68
69
69
70
70
self .transpose_button = QPushButton ('&Transpose' )
71
- self .center_Geometric_button = QPushButton ('&Center by Geometric Mean' )
72
- self .center_Arithmetic_button = QPushButton ('&Center by Arithmetic Mean ' )
71
+ self .center_Geometric_button = QPushButton ('&Divide by Geometric Mean' )
72
+ self .center_Arithmetic_button = QPushButton ('&Subtract Arithmetic Average ' )
73
73
74
74
self .min_max_button = QPushButton ('&Min-Max Standard' )
75
- self .std_button = QPushButton ('&Standard Transform' )
76
- self .log_button = QPushButton ('&Log Transform' )
77
- self .log_ten_button = QPushButton ('&Log 10 Transform' )
78
- self .log_e_button = QPushButton ('&Log e Transform' )
75
+ self .std_button = QPushButton ('&Standard' )
76
+ self .log_button = QPushButton ('&Log' )
77
+
78
+ self .log_ten_button = QPushButton ('&Log 10' )
79
+ self .log_e_button = QPushButton ('&Log e' )
80
+
81
+
82
+ self .exp_ten_button = QPushButton ('&10 Exponential' )
83
+ self .exp_e_button = QPushButton ('&e Exponential' )
84
+
85
+ self .divide_by_sum_button = QPushButton ('&Divide by Sum' )
79
86
80
87
self .fill_NaN_button = QPushButton ('&Fill Blanks With 0' )
81
88
self .remove_row_with_0_button = QPushButton ('&Remove Rows With Blanks' )
@@ -93,10 +100,17 @@ def create_main_frame(self):
93
100
self .center_Geometric_button .clicked .connect (self .center_Geometric )
94
101
self .center_Arithmetic_button .clicked .connect (self .center_Arithmetic )
95
102
self .min_max_button .clicked .connect (self .min_max )
96
- self .std_button .clicked .connect (self .std_trans )
97
- self .log_button .clicked .connect (self .log_trans )
98
- self .log_ten_button .clicked .connect (self .log_ten_trans )
99
- self .log_e_button .clicked .connect (self .log_e_trans )
103
+ self .std_button .clicked .connect (self .std )
104
+
105
+ self .log_button .clicked .connect (self .log )
106
+
107
+ self .log_ten_button .clicked .connect (self .log_ten )
108
+ self .log_e_button .clicked .connect (self .log_e )
109
+
110
+ self .exp_ten_button .clicked .connect (self .exp_ten )
111
+ self .exp_e_button .clicked .connect (self .exp_e )
112
+
113
+ self .divide_by_sum_button .clicked .connect (self .divide_by_sum )
100
114
101
115
102
116
@@ -111,6 +125,7 @@ def create_main_frame(self):
111
125
self .hbox0 = QHBoxLayout ()
112
126
self .hbox1 = QHBoxLayout ()
113
127
self .hbox2 = QHBoxLayout ()
128
+ self .hbox3 = QHBoxLayout ()
114
129
115
130
#self.vbox.addWidget(self.canvas)
116
131
self .vbox .addWidget (self .tableView )
@@ -122,21 +137,25 @@ def create_main_frame(self):
122
137
for w in [self .center_Arithmetic_button ,
123
138
self .center_Geometric_button ,
124
139
self .min_max_button ,
125
- self .std_button ,
126
- self .log_ten_button ,
127
- self .log_e_button ,]:
140
+ self .std_button ]:
128
141
self .hbox1 .addWidget (w )
129
142
143
+ for w in [self .log_ten_button ,self .exp_ten_button ,
144
+ self .log_e_button ,self .exp_e_button ,
145
+ self .divide_by_sum_button ]:
146
+ self .hbox2 .addWidget (w )
147
+
130
148
for w in [self .transpose_button ,
131
149
self .fill_NaN_button ,
132
150
self .remove_row_with_0_button ,
133
151
self .remove_column_with_0_button ]:
134
- self .hbox2 .addWidget (w )
152
+ self .hbox3 .addWidget (w )
135
153
136
154
137
155
self .vbox .addLayout (self .hbox0 )
138
156
self .vbox .addLayout (self .hbox1 )
139
157
self .vbox .addLayout (self .hbox2 )
158
+ self .vbox .addLayout (self .hbox3 )
140
159
141
160
self .main_frame .setLayout (self .vbox )
142
161
self .setCentralWidget (self .main_frame )
@@ -230,7 +249,6 @@ def transpose(self):
230
249
def remove_row_with_0 (self ):
231
250
self .settings_backup = self ._df
232
251
self .settings_backup = self .settings_backup .dropna ()
233
-
234
252
#dataframe = self._df
235
253
ItemsAvalibale = self ._df .columns .values .tolist ()
236
254
@@ -271,7 +289,6 @@ def center_Arithmetic(self):
271
289
self .tableView .setModel (self .tableresult )
272
290
self .show ()
273
291
274
-
275
292
def min_max (self ):
276
293
# mean=self.result.T.mean(numeric_only= float)
277
294
# std=self.result.T.std(numeric_only= float)
@@ -281,7 +298,7 @@ def min_max(self):
281
298
self .tableView .setModel (self .tableresult )
282
299
self .show ()
283
300
284
- def std_trans (self ):
301
+ def std (self ):
285
302
mean = self .result .T .mean (numeric_only = float )
286
303
std = self .result .T .std (numeric_only = float )
287
304
tmpresult = (self .result .T - mean )/ std
@@ -290,22 +307,41 @@ def std_trans(self):
290
307
self .tableView .setModel (self .tableresult )
291
308
self .show ()
292
309
293
- def log_trans (self ):
310
+ def log (self ):
294
311
self .result = np .log (self .result )
295
312
self .tableresult = PandasModel (self .result )
296
313
self .tableView .setModel (self .tableresult )
297
314
self .show ()
298
315
299
- def log_ten_trans (self ):
316
+ def log_ten (self ):
300
317
self .result = np .log10 (self .result )
301
318
self .tableresult = PandasModel (self .result )
302
319
self .tableView .setModel (self .tableresult )
303
320
self .show ()
304
321
305
- def log_e_trans (self ):
322
+ def exp_ten (self ):
323
+ self .result = np .power (10 ,self .result )
324
+ self .tableresult = PandasModel (self .result )
325
+ self .tableView .setModel (self .tableresult )
326
+ self .show ()
327
+
328
+ def log_e (self ):
306
329
self .result = np .log (self .result )
307
330
self .tableresult = PandasModel (self .result )
308
331
self .tableView .setModel (self .tableresult )
309
332
self .show ()
310
333
334
+ def exp_e (self ):
335
+ self .result = np .power (np .e ,self .result )
336
+ self .tableresult = PandasModel (self .result )
337
+ self .tableView .setModel (self .tableresult )
338
+ self .show ()
311
339
340
+ def divide_by_sum (self ):
341
+ sum = self .result .T .sum (numeric_only = float )
342
+ print (sum )
343
+ tmpresult = (self .result .T )/ sum
344
+ self .result = tmpresult .T
345
+ self .tableresult = PandasModel (self .result )
346
+ self .tableView .setModel (self .tableresult )
347
+ self .show ()
0 commit comments