Just having a bit of a struggle getting the right formatting with the csv output files.
I have the following list called found in python:
[['dropbearid', 'distance'],
['DB_1487', 17.543651156695343],
['DB_1901', 24.735333924441772],
['DB_2800', 6.607094868078008]]
When I use
import csv
out = csv.writer(open("myfile.csv","w"), delimiter=',',quoting=csv.QUOTE_ALL)
out.writerow(found)
I get a file that when I open in excel has the values but it has 'dropbearid','distance' in one cell and 'DB_1487','17.54...' in the next cell and so on all continued across the first row.
Is there a way to get the output setup so 'dropbearid' and 'distance' are placed across two columns and all the list below are put in rows below?
Thanks!