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