Используйте метод .isin()
, чтобы найти эти строки
df_out1.loc[df_out1['E'].isnull() & df_out1['LN'].isin(ef_file_in['LN'])]
Изменить: после просмотра ваших данных, я думаю, что я получаю то, что вы хотите
import pandas as pd
df_out1 = pd.DataFrame({'LN':['SMITH','JONES','HARPER'],
'E': ['H',np.nan,'F'],
'DATE':['4-2-2000', '2-9-2018', '1-1-2000']})
ef_file_in = pd.DataFrame({'LN':['PERRY','JONES','SMITH'],'E': ['F','H','B']})
# merge the two dataframes to get all in one
df_out1 = pd.merge(df_out1,ef_file_in,on='LN',how='left')
# LN E_x DATE E_y
# 0 SMITH H 4-2-2000 B
# 1 JONES NaN 2-9-2018 H
# 2 HARPER F 1-1-2000 NaN
# Now E has changed to E_x and you have a new column E_y form ef_file_in
# get a new column E = copy E_x except when null, then get E_y
df_out1['E'] = np.where(df_out1.E_x.isnull(),df_out1['E_y'],df_out1['E_x'])
# drop E_x and E_y, not useful now
df_out1.drop(columns=['E_x','E_y'],inplace=True)
# Notice that column E is not null anymore for LN=Jones
# LN DATE E
# 0 SMITH 4-2-2000 B
# 1 JONES 2-9-2018 H
# 2 HARPER 1-1-2000 F