I want to convert float to int, using .apply(np.floor) to round up to the nearest whole number.
f1.loc[today,'QuantityRounded'] = f1.loc[today,'QuantityNotRounded'].apply(np.floor)
But when using .loc with this function and for loop, it shows attribute error.
AttributeError: 'numpy.float64' object has no attribute 'apply'
Remove ‘apply’ and try using
np.floor()
directly: