These are chat archives for pydata/pandas

Dec 2018
Talat CAN
Dec 06 2018 08:04 UTC
what is the fastest way to change values in column based on another column?
Im using following code but its so slow:
for i in tqdm(range(0, len(old_nisan_plc))): new_nisan['RATIO'][new_nisan['PLC_NO'] == old_nisan_plc[i]] = old_nisan_ratio[i] time.sleep(0.01)
Lucas Durand
Dec 06 2018 21:11 UTC
time.sleep definitely isn't helping
Dec 06 2018 23:07 UTC
@talatccan have a look here. I believe numpy.where is the way to go