pandas apply function with multiple condition?
Alternatively, you can use loc:

import pandas as pd

df = pd.DataFrame({"age": [-100, 300, 400, 500, 600, 700]})
df["age"].loc[(df["age"] &lt; 500) &amp; (df["age"] &gt;= 0)] = 0


Now your df looks like this:

    age
0   -100
1   0
2   0
3   500
4   600
5   700