I would like to do an if test on the 'ave_data' DataFrame below:
ave_data=
Time ------------ F7 --------------- F8 --------------- F9
00:00:00 ---- 43.005593 ---- -56.509746 ---- 25.271271
01:00:00 ---- 55.114918 ---- -59.173852 ---- 31.849262
02:00:00 ---- 63.990762 ---- -64.699492 ---- 52.426017
Specifically, I would like to test if any of the values are less than 0.05 and output 1 if they are not, and 0 if they are, so that the output (named, for example, 'tested_ave_data') looks like this:
tested_ave_data=
Time ------------ F7 --- ------- F8 ---------- F9
00:00:00 -------- 1 ------------ 0 ------------ 1
01:00:00 -------- 1 ------------ 0 ------------ 1
02:00:00 -------- 1 ------------ 0 ------------ 1
Can anyone help me develop a code to do this? I've searched for ways to do this for a long time now but not been successful.
Aucun commentaire:
Enregistrer un commentaire