1
How can I create a csv file containing column width information and configured header and things like that, is it possible? or we can only write the data without any configuration?
1
How can I create a csv file containing column width information and configured header and things like that, is it possible? or we can only write the data without any configuration?
3
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 more information on the website: https://docs.python.org/3/library/csv.html#csv-fmt-params
Browser other questions tagged python python-3.x excel
You are not signed in. Login or sign up in order to post.
This link may be a good suggestion, but your reply will not be valid if one day the link crashes. In addition, it is important for the community to have content right here on the site. It would be better to include more details in your response. A summary of the content of the link would be helpful enough! Learn more about it in this item of our Community FAQ: We want answers that contain only links?
– Denis Rudnei de Souza
I put an example to follow the rules.
– Rafael Coelho