Welcome!
This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
Export CSV file with customer fields
This question has been flagged
As a moderator, you can either validate or reject this answer.from io import StringIO from csv import DictWriter import csv ls=[] ls.append({"key":value,"key2":value}) datas=ls field_name=['key1','key2'] with open('/tmp/Demo.csv','w') as file: csvwriter=DictWriter(file,field_name,'\t') csvwriter.writeheader() csvwriter.writerows(datas) file.close() |
Your Answer
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Aug 23
|
146 |