csv output places records on every other line
bfmcneill opened this issue · 3 comments
bfmcneill commented
When I export rows to .csv it seems like a new line is inserted between each record. Is this by design? Thanks!
bfmcneill commented
'
import records
db_url = os.environ.get('DATABASE_URL')
db = records.Database(db_url)
rows = db.query_file('./the_best_sql_on_earch.sql')
f = open('./report.csv','w')
f.write(rows.export('csv'))
f.close()
`
ayancey commented
Try setting newline='' in open()
bfmcneill commented
Thanks!