Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update projects/fdic/save_to_csv.py

Changed delimiter; substituted writerows for loop
  • Loading branch information...
commit 9e539c7d892df439c8c89763c9478e86cac2aaf2 1 parent 60eecf6
@cschnaars cschnaars authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 projects/fdic/save_to_csv.py
View
8 projects/fdic/save_to_csv.py
@@ -86,12 +86,12 @@ def convertdatestring(datestring):
row['updated'] = ''
with open(savedir + 'fdic_output.txt', 'w') as outputfile:
- wtr = csv.DictWriter(outputfile, delimiter= '|', fieldnames=outputheaders,
- lineterminator = '\n')
+ wtr = csv.DictWriter(outputfile, delimiter=',', fieldnames=outputheaders,
+ lineterminator='\n', quotechar='"', quoting=csv.QUOTE_NONNUMERIC)
# Add headers to output
wtr.writeheader()
- for row in data:
- wtr.writerow(row)
+ # Write the data
+ wtr.writerows(data)
Please sign in to comment.
Something went wrong with that request. Please try again.