How can I create a csv file containing column width information and configured header and stuff like that, is it possible? or can we just write the data without any configuration?
How can I create a csv file containing column width information and configured header and stuff like that, is it possible? or can we just write the data without any configuration?
Yes, it is possible.
An example of using the "," delimiter would be:
import csv
csvfile = "C:\pasta\arquivo.csv"
f=open(csvfile,'wb') # abre o arquivo para escrita apagando o conteúdo
csv.writer(f, delimiter =' ',quotechar =',',quoting=csv.QUOTE_MINIMAL)
Check out more information on the site: link