pandas replace float column precision code example Example: replace floats in dataframe df = df.mask(np.isclose(df.values, 0.997345))