def write_csv():
    writer = csv.writer(open('./spikedata/avggas.csv', 'w', newline=''))
    writer.writerow(('block_number', '20 sec', '30 sec', '40 sec', '60 sec', '90 sec', '120 sec'))
    for blockno in range(block_start, block_end):
        writer.writerow((blockno, avggas_per[20][blockno], avggas_per[30][blockno], avggas_per[40][blockno], avggas_per[60][blockno], avggas_per[90][blockno], avggas_per[120][blockno]))
def write_csv():
    writer = csv.writer(open('./spikedata/avggas.csv', 'w', newline=))
    writer.writerow(('block_number', '20 sec', '30 sec', '40 sec', '60 sec', '90 sec', '120 sec'))
    for blockno in range(block_start, block_end):
        writer.writerow((blockno, avggas_per[20][blockno], avggas_per[30][blockno], avggas_per[40][blockno], avggas_per[60][blockno], avggas_per[90][blockno], avggas_per[120][blockno]))