Is there a way in pandas to calculate how many True or False conditions are there in a column.
eg: If a data frame has 5 columns and I want to select rows with at least three columns with values > 3, can this be done without the use of an iterator?
So in the example below i will select rows b and c.
In [12]: df2
Out[12]:
A B C D E
a 1 2 2 8 6
b 3 6 5 8 8
c 6 2 5 5 2
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…