I have very simple line of code:
df[df.RESP == 0].CCOL
where I list DataFrame (df) CCOL values if value in RESP column is equal to zero.
However, if I add an array (e.g. CNames=[CCOL1, CCOL2, CCOL3...]) and try to loop through the array in order to get every column values IF RESP == 0 the above line of code could not be implemented.
I tried this way:
for c in CNames:
df[df.RESP == 0].c
Any idea how I can solve this?
Thanks!