After rounding to an integer the result of operations between lists that produce an array is there a way to remove the decimal point? I am using python in Jupyter notebooks.
Should I use something other than 'np.round'?
'FoodSpent and 'Income' and are simply two lists of data that I created. The initial rounding attempt left the decimal point.
>>>PercentFood = np.around((FoodSpent / Income) * 100, 0)
>>>PercentFood
array([[ 10., 7., 11., 10., 6., 10., 10., 12., 11., 9., 11.,
14.]
Thanks to advice given I ran the following, which rounded down to the integer without giving the decimal point.
>>> PercentFood = ((FoodSpent / Income) * 100)
>>> PercentFood.astype(int)
array([[ 9, 6, 11, 9, 6, 9, 10, 11, 10, 9, 11, 13]])