Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

saving data in python

replicate = 5

with open("output_data" + str(replicate) + ".csv", "w") as out_file:
    for i in range(len(fitness_list)):
        out_string = ""
        out_string += str(fitness_list[i])
        out_string += "," + str(trait1_list[i])
        out_string += "," + str(trait2_list[i])
        out_string += "
"
        out_file.write(out_string)
Source by nbviewer.org #
 
PREVIOUS NEXT
Tagged: #saving #data #python
ADD COMMENT
Topic
Name
2+2 =