I have a list of names that I have scraped off a website and I want to put them into a CSV file with one name in the first column of each row.
I'm using python's CSV module as demonstrated in the Python documentation:
with open('/home/kwal0203/Desktop/eggs.csv', 'a') as csvfile:
... writer = csv.writer(csvfile)
... writer.writerow("Hello my friend")
The script saves each letter of the sentence in a new column. The only way I've found to get the sentence to save into one cell is using this script:
with open('/home/kwal0203/Desktop/eggs.csv', 'a') as csvfile:
... writer = csv.writer(csvfile, delimiter = ' ')
... writer.writerow("Hello my friend")
But now even though the output is in one cell it looks like this:
Hello""my""friend
Is there anyway to use the first method and get all the letters in one cell? or use the second method and get rid of the quotation marks?
Thanks any help appreciated.