I'm trying to load my old excel format file (xls). But I got error with empty row. How can I break loop from empty row?
def isNaN(num):
return num != num
wb = pd.ExcelFile(file)
first_sheet = wb.sheet_names[0]
ws = wb.parse(first_sheet, header=5)
for row in ws.itertuples():
if isNaN(row[11]):
break
Error:
AttributeError: 'dict' object has no attribute 'headers'