imagine a dataset like the following:
df = pd.DataFrame({'Contacts 6M':[4,7,20,5,6,0,1,19], 'Contacts 3M':[2,3,9,np.nan,np.nan,0,np.nan,9]})
As you can imagine: Column 'Contacts 6M' is the counted number of contacts in the last 6 month where the other column holds the information of the number of contacts in the last 3 month. So 'Contacts 3M' includes parts of the information of the other column.
I impute the missing values with the method forward fill:
df.ffill(axis = 1, inplace=True)
My question: How do I divide the imputed value by 2 and round the imputed values (please no floats) while iterating over the dataset?
It can be easily done by this way: