I have a dataframe, and in some columns there are values such as "<0.5, <10, <100" etc. I want to replace all those values with 0 if the value just contains "<". How can I do it? I'm relatively new with Python.
Tried to use pd.DataFrame.replace().
I have a dataframe, and in some columns there are values such as "<0.5, <10, <100" etc. I want to replace all those values with 0 if the value just contains "<". How can I do it? I'm relatively new with Python.
Tried to use pd.DataFrame.replace().
df[df["Column"].str.contains("<",na=False)]=0