Nov-07-2023, 04:32 PM
(This post was last modified: Nov-07-2023, 04:32 PM by jacksfrustration.)
(Nov-07-2023, 03:55 PM)deanhystad Wrote: What is "flights" when there are no matching flights? When you know that you should know why your code does not identify that case.
sometimes flights doesnt even get executed because the return of the save_ent function is of type None. i have tried checking the variable that i write to the csv file and sometimes it is None. I have tried writing it using pandas Dataframe as below
d_f=pd.DataFrame(new_list) d_f.to_csv("flight_data.csv",index=False,mode="a")i have also tried using the csv framework like
wth open("flight_data.csv","a")as file: writer=csv.writer(file) writer.writerrows(new_list)in either occassion does it write or print out a message. In most situations i had a
Output:0
""
being appended to my csv file or no ouput whatsoever. I have also tried both writer.writerows or writer.writerow to no avail. the weird thing is that the names of my rows are always there its the values that never get written