Hello All…i got dificulties looking for code to select 2 columns based on another column value. I got 3 columns a,b,c as below
a b c
1 2 3
2 3 4
3 4 5
2 3 5
3 2 5
I have the code below but it sel
testdf = df.query("a==2 | a==3")["b"] <-- this one works but only b column show
I have tried below to show b,c columns but it does not work…any quick tips please.
testdf = df.query("a==2 | a==3")["b"]["c"] <-- this does not work