I have a list with 0's in it that I want to change to np.nan for calculations in doing. I am trying to do the following which only replaces the first 0:

```
l = [0,2,3,4,0]
l[l == 0] = np.nan
print l
[nan,2,3,4,0]

```

Is there a way to do this substitution for every item in the list?