[New-bugs-announce] [issue32116] CSV import and export simplified
Paul Long
report at bugs.python.org
Wed Nov 22 13:36:31 EST 2017
New submission from Paul Long <paul at paullong.net>:
It would be helpful if the CSV module included standard functions that simplify the import of CSV files to a list and the export of CSV files to a list. Here's an example of what they could be:
def csv2list(file_name):
list_name=[]
with open(file_name) as csvfile:
readerfile = reader(csvfile)
for row in readerfile:
list_name.append(row)
return list_name
def list2csv(list_name,file_name):
with open(file_name, 'w', newline='') as csvfile:
writerfile = csv.writer(csvfile)
writerfile.writerows(list_name)
----------
components: Library (Lib)
messages: 306746
nosy: paullongnet
priority: normal
severity: normal
status: open
title: CSV import and export simplified
type: enhancement
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32116>
_______________________________________
More information about the New-bugs-announce
mailing list