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