Here is my dataset:
I want to put in the column 'Solicitud de personacion' if its values are zero the values in the column 'Solicitud de personacion_'. I use a loop and the iloc function to index, but it doesn't work. What are the solutions?
hito = 'Solicitud personacion'
for i in range(len(a)):
if a[hito].iloc[i] != 0:
a[hito].iloc[i] = a[hito].iloc[i]
else:
a[hito].iloc[i] = a[hito + '_'].iloc[i]