May-05-2019, 07:46 AM
The answer depends on what container did you use to store the data. If you are working with numpy arrays,
you can do that as follows:
you can do that as follows:
import numpy as np x = np.array([0.16, 0, 0, 0.65, 0.17]) x[x < 0.5] *= 2If your data is presented as a column of Pandas dataframe, you can do it by almost similar way:
# df Pandas data frame df[df.iloc[:, <column number>]<0.5] *= 2