I have a dataframe where I have performed operation like:
df:
ColA ColB ColC
1 7.9E-08 1.3E-16
0.92 2.2E-02 4.5E-18
0.98 2.2E-06 5.6E-18
I want to check if value of colA is > 0.95, If yes, I want to print true in additional column or 'False' if not
The output should looks like:
ColA ColB ColC Confidence %
1 7.9E-08 1.3E-16 True
0.92 2.2E-02 4.5E-18 False
0.98 2.2E-02 4.5E-18 Type
Code:
for index, row in result_withoutTC.iterrows():
if row['Confidence %'] > 0.95:
reject_list.append(True)
else:
accept_list_withoutTC.append(False)
result_withoutTC['Confidence %'] = reject_list_without_TC