您提供的內容對於我來說甚至不是一個數據框。也許下面的代碼將讓你在正確的軌道:
#create random data and their critical values
import random
df = pd.DataFrame({"Value": pd.Series(random.sample(range(0,100),15)),
"Critical": pd.Series(random.sample(range(100,3000),15))})[["Value","Critical"]]
# print whole dataframe
print df
Value Critical
0 78 966
1 18 1595
2 88 963
3 24 2927
4 47 1082
5 26 2425
6 36 2847
7 0 143
8 73 1205
9 65 638
10 92 341
11 27 213
12 21 1531
13 44 590
14 28 584
# select only those with value bigger that 5% of its critical value
df = df[df["Value"]>df["Critical"]*0.05]
# print criticals only
print df
Value Critical
0 78 966
2 88 963
8 73 1205
9 65 638
10 92 341
11 27 213
13 44 590
*我有一個數據幀* - 表明,數據框和預期的結果,可以迅速幫助 – RomanPerekhrest
@RomanPerekhrest感謝。我添加了一個例子。 – zhr