Skip to content

Instantly share code, notes, and snippets.

@NickMirnov
Created December 10, 2013 12:27
Show Gist options
  • Save NickMirnov/7889851 to your computer and use it in GitHub Desktop.
Save NickMirnov/7889851 to your computer and use it in GitHub Desktop.
Настройка формата читаемых и записываемых файлов csv. Выставление разделителей
import csv
writer = csv.writer(open("some.csv", "wb"), delimiter=':', quoting=csv.QUOTE_MINIMAL, \
quotechar='`', lineterminator='|')
writer.writerows([ [1997, "Ford", "E350", "ac, abs, moon", "3000.00"],
[1999, "Chevy", "Venture `Extended Edition`", "", "4900.00"],
[1996, "Jeep", "Grand Cherokee", "air, moon roof, loaded MUST SELL!", "4799.00"] ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment