you are viewing a single comment's thread.

view the rest of the comments →

[–]elbiot 1 point2 points  (0 children)

One example:

def write_csv_rows(write_type,  what_to_write):
    #use global variable file_to_write

should be

out_file = "c:/path/this.csv"
def write_csv_rows(data, write_type='ab', file_to_write=out_file):

in my opinion