I am trying to turn a float into an integer by rounding down to the nearest whole number. Normally, I use numpy's .apply(np.floor) on data in a dataframe and it works. However in this instance I am iterating in a forloop with this code:
f1.loc[today,'QuantityRounded'] = f1.loc[today,'QuantityNotRounded'].apply(np.floor)
And I get this error:
AttributeError: 'numpy.float64' object has no attribute 'apply'
It seems when using a forloop and .loc the numpy function doesn't work.
What is the easiest way to round down in a forloop using .loc (sorry my vocabulary here is lacking)?
Thanks