Here is my problem, I have two columns as below :
A B
-3 4
-6 -8
12 14
I would like to create a code that replace all the values by 1 if the value is > -2 and by 0 if not.
I know that with numpy it would have been simple by using
d["newcolum"]=np.where(d < -2,1,0) but I have more difficulties with pandas as its where function just show the value if the condition is not met.
Do you guys know something that could help me? Thanks