datahq / dataflows

DataFlows is a simple, intuitive lightweight framework for building data processing flows in python.
https://dataflows.org
MIT License
194 stars 39 forks source link

when using dump_to_path, it gives blank lines between each row #58

Closed akariv closed 5 years ago

akariv commented 5 years ago

Other problem occurred when using dump_to_path, it gives blank lines between each row. Possible solution: https://stackoverflow.com/questions/3348460/csv-file-written-with-python-has-blank-lines-between-each-row

Blank lines between the rows have been fixed by doing next steps:

file: https://github.com/datahq/dataflows/blob/master/dataflows/processors/dumpers/file_dumper.py line: 92 add newline='' as argument in tempfile.NamedTemporaryFile from this: temp_file = tempfile.NamedTemporaryFile(mode="w+", delete=False) to this: temp_file = tempfile.NamedTemporaryFile(mode="w+", delete=False, newline='') This fix should be checked Linux and Mac how it behaves.

Originally posted by @svetozarstojkovic in https://github.com/datahq/dataflows/issues/57#issuecomment-451640946