Python create excel readable csv from list of float values in single column
Question: I would like to be able to create a csv file from a list of floating point
values in a single column. Not sure how to achieve this...

    
    
    mylist = [1.11, 2.22, 3.33, 4.44, ...]
    with open('myfile.csv', "wb") as file:
        writer = csv.writer(file, delimiter=',')
        writer.writerow(mylist)
    

When I open this csv in excel all of the values are printed with each value in
its own column, but I need them to be all in one column. How can I do this in
python? Or how do I need to format my list of numbers to achieve this?


Answer: Iterate through your list to add rows:

    
    
    import csv
    
    mylist = [1.11, 2.22, 3.33, 4.44]
    with open('myfile.csv', "wb") as f:
        writer = csv.writer(f, delimiter=',')
        for elem in mylist:
            writer.writerow([elem])
    

