for i in range(len(head_search_val)):
found=0
for k in range(len(data)):
if len(data[k])<2:
continue
if head_search_val[i]==data[k][0]:
head_results.append(data[k][1:return_cols+1])
found=1
if k==len(data)-1 and found==0:
raise Exception('Could not find: ' + head_search_val[i])
is
for i in range(len(head_search_val)):
found=0
for k in range(len(data)):
if k==len(data)-1 and found==0:
#raise Exception('Could not find: ' + head_search_val[i])
warnings.warn('Could not find: ' + head_search_val[i])
head_results.append(['header not found'])
if len(data[k])<2:
continue
if head_search_val[i]==data[k][0]:
head_results.append(data[k][1:return_cols+1])
found=1
was
is