import csv
return_filename = "feature_information_subj" + str(experiment)
with open(return_filename, 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
for row in focused_data:
writer.writerow(row)
for row in unfocused_data:
writer.writerow(row)
for row in drowsy_data:
writer.writerow(row)
这里,focused_data,unfocused_data,drowsy_data,都是numpy格式,没试过不是numpy格式的情况