Trying to reference two sequences in a python for loop such as:
for (col1_row, col2_row) in (df.col1, df.col2)
Then check if two conditions are true:
if col1_row = 'nan' and col2_row = '1000 Main Street'
Then update the corresponding cell in df.col1 with a set value:
df.col1 == 'Chucky Cheeze Restaurant'
Does not have to be a for loop, but I thought I'd explain it this way. Looking for fastest, most efficient method. Thanks.
I suggest not use loops, because slow, better is use
numpy.wherewith boolean mask:Or: