using np.where i am able to get 4 columns match1,match2,match3 and match4.Final column MATCHED has to be updated based on the values of match 1,match2,match3 and match4.if all 4 are yes then i have to update MATCHED as 'Yes' if any 3 out of 4 are yes then also 'Yes' is to be updated.Else No.
final_data = final_data.copy()
final_data['Match1'] = np.where(final_data['PROCESSOR_sub_column'] == final_data['PROCESSOR_Title'] , 'Yes', 'No')
final_data['Match2'] = np.where( final_data['RAM'] == final_data['RAM_Title'] , 'Yes', 'No')
final_data['Match3'] = np.where( final_data['Storage'] == final_data['STORAGE_Title'] , 'Yes', 'No')
final_data['Match4'] = np.where( final_data['Storage Type'] == final_data['STORAGE_TYPE_Title'] , 'Yes', 'No')
if (final_data['Match1']&final_data['Match2']&final_data['Match3']&final_data['Match4'] == 'Yes'):
final_data[Matched] = 'Yes'
attaching the data already generated as screenshot :data looks like this
i also tried to get the column Matched directly using np.where() , but i was not successful to check four conditions at the same time. also i don't know whst i should pass as X.y in np.where(,x,y) while using 4 conditions.
apologies if this question is repeat, i have tried my level best to read all previous posts about related topic.