I have data as in the first picture. Data I have written code as:
test_data = pd.read_excel('all_test_doc.xlsx')
conditions = [ test_data['Area Code'] == 'A56',test_data['Area Code'] == 'A90',test_data['Area
Code'] == 'A20',test_data['Area Code'] == '']
values = [ 'Mount Bundy', 'Downhill', "Paterson", 'No data']
test_data['Area Name'] = np.select(conditions, values)
test_data.to_excel("test_output.xlsx")
I want to obtain a result as: desired output
But landed in the following result: Result with 0 in Blank
How do I get result as in pc 2?