I have a pandas Dataframe with some missing values in column A.I have noticed that column A values are missing when column B values are 0 as below:

```
B   A
-----
10  100
0   NULL
20  500
0   NULL

```

I want to write code in python based on the logic below:

```
IF df[A] isnull then 
 if df[B]==0  then
    replace df[A] with 0
 else
    drop df[A] row
END IF

```