Jun-12-2019, 08:12 PM
Ok. Managed to get the index back and find the original row via the index. However it is still not doing it (still erroring) so I must still be doing it wrong.... any ideas (I have a headache now)
Final loop is now :
Final loop is now :
for i,r in checkout.iterrows(): ind = -1 f = cleaned[cleaned['atime'].isnull()] if f is not None: f = f[f['date']==r['date']] if f is not None: f = f[f['dtime']<r['atime']] if f is not None: cleaned.iloc[f.index[0]]['atime','arrival','cost']=r['atime','arrival','cost']