How do I replace multiple values in a column in pandas?

How to replace all string values in a column pandas?

I have a Pandas DataFrame that looks like this: import pandas as pd.

df = pd.DataFrame() df
Now I want to replace all the float numbers with 0.00 (rounding down).00
return 0.00 But how do I actually write it into a function? The problem with my function is that it has to be for n values at a time. But I don't know how to go on from here.

The solution should replace all values in the column called value. You can use loc to select each row individually, then apply your function to each value in the column: def replacefloat(numbers): try: return float(numbers). except ValueError: df.apply(lambda x: replacefloat(x)) Output: 0 2.