I have an array presented as list of lists, and I need ro remove all rows and then columns where values are greater then some variable. I can't find out myself how to do it. All I could do is something like:
rowNum =0
for row in self.Table:
rowIsValid = False
for value in row:
if not value is None and (value > 0.35 and not value == 1):
rowIsValid = True
if not rowIsValid:
self.Table = numpy.delete(self.Table, (rowNum), axis=0)
#self.Table.pop(row)
rowNum+=1
And i'ts just for rows. And it didn't work( How do remove columns - I cant even imagine.
Data example Input:
1.0 None 0.333 0.166 None
0.4 1.0 0.541 0.4 0.3
0.1 0.41 1.0 0.23 0.11
Output (for example i need remove rows and columns where all values are smaller than 0.3 and not (1 not included in calcualtions))
0.4 1.0 0.541 0.4
0.1 0.41 1.0 0.23