I have a dataframe df:
df = pd.DataFrame({'col_1':[1,1,1,-1,2,2,2,-1],
'col_2':[2,2,2,-1,3,3,3,-1],
'col_3':[0,0,0,10,0, 0,0,20 ]})
I wanted to change the col_3 such that, it uses the value of col_3 with the value of -1 (in col_1 and col_2) and removes the rows with -1. my output should look like this,
df = pd.DataFrame({'col_1':[1,1,1,2,2,2],
'col_2':[2,2,2,3,3,3],
'col_3':[10,10,10,20,20,20 ]})