Closed Ooxie closed 5 years ago
Bonobo version: 0.6.2 + #282 Python version: 3.5.2 Platform: Linux 4.15.0-30 - Ubuntu 16.04.5
Given the input file 'input.csv':
x,y aaa,bbb ccc,ddd
And this minimal code:
#!/usr/bin/env python # -*- coding: utf_8 -*- import bonobo @bonobo.config.use_raw_input def bag_to_tuple(row): yield tuple(v for k, v in row._asdict().items()) def get_graph(): graph = bonobo.Graph() graph.add_chain( bonobo.CsvReader(path='input.csv'), bag_to_tuple, bonobo.CsvWriter(path='output.csv'), ) return graph if __name__ == '__main__': bonobo.run(get_graph())
Every field from the simple tuple is written into a new line in the output file 'output.csv':
aaa bbb ccc ddd
All the fields from a tuple should belong to the same line, like below:
aaa,bbb ccc,ddd
Solved by #295, thanks to @josteinl
Bonobo version: 0.6.2 + #282 Python version: 3.5.2 Platform: Linux 4.15.0-30 - Ubuntu 16.04.5
Given the input file 'input.csv':
And this minimal code:
Every field from the simple tuple is written into a new line in the output file 'output.csv':
All the fields from a tuple should belong to the same line, like below: