0

I am creating my header list using this function from CSV file.

  • def createHeader(): global a, b,headers1 a=[] b=[] headers1=[] print("Opening the CSV file and reading data") with open('Data_File.csv') as file: reader =csv.reader(file) for item in reader: a.append(item[0]) b.append(item[1].lower()) while ("" in a): a.remove("") for i in a: for j in b: y = {i:j} headers1.append(y) print(headers1) – Chandan May 26 '20 at 11:42
  • While running it, getting the timeout error sometime and it is getting failed, able to manage with a retry method , but it rerun the entire header list again – Chandan May 26 '20 at 11:44
  • I want to execute only for the remaining header list – Chandan May 26 '20 at 11:44

0 Answers0