Finally, the smoothed data array is written to a new CSV file, with the X values omitted (since they have not been smoothed). The first row of the CSV file contains headers indicating the column numbers of the original Y values. The smoothed Y values are written row by row, with each row corresponding to a row of the original data.