0

Below is my code

excelfile = pd.read_excel(dataFile)    
data = excelfile.loc[excelfile["sent email"=="N"]  
namelist = data['Name']
noofcand = len(namelist)
for idx in range(1, noofcand):
name = namelist[idx]

Getting below error when executing above piece of code

raise KeyError(key) from err

KeyError: 1

My excel data looks like this

Name Sent Email
Alex Y
Rex N
Ethan N
Konrad Rudolph
  • 506,650
  • 124
  • 909
  • 1,183
BK Barathi
  • 61
  • 1
  • 9

0 Answers0