If i have 2 columns, 'a' and 'b'. 'a' has random values and 'b' has some missing values. If i want to impute missing values of 'b' with 0 if that row has 'a' value 0, then how can I achieve that in python
What is the variable type? DataFrame? Array? or are those just two lists?
In any way, you should iterate through with index and assign b[index] = 0 if a[index] == 0
Or at least this is how I understood your question.