Optimize a simple and quick python script for transposing a .csv file
I believe there is a much simpler way of doing this.

If I correctly understand the problem, the idea is to produce a single column of frequencies.  

with open('input.txt', 'r') as infile, open('out.csv', 'w') as outfile:
    print &gt;&gt; outfile, "Frequency"
    for line in infile:
        for freq in line.split()[2:]:
            print &gt;&gt; outfile, freq


This iterates over each line in the input file.  It uses split to eliminate whitespace and to split each line into fields.  It then discards the first two, which are assumed to be "Frequencies" and "--" and writes the remaining fields to the output file.