本文介绍了无法为es2csv cli更改输出csv的定界符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请问我在做什么错?我无法使用es2csv cli工具更改输出文件的定界符.
Could you please suggest what i am doing wrong? i cannot change the delimiter of the output file using es2csv cli tool.
es2csv -q '*' -i test_index -o test.csv -f id name -d /t
推荐答案
实际上,这里已经报告了此问题: https://github.com/taraslayshchuk/es2csv/issues/51
Actually this issue has been reported here: https://github.com/taraslayshchuk/es2csv/issues/51
如果您不想等待发布此修复程序,可以像这样更改es2csv.py
的第212行,它将起作用:
If you don't want to wait for the fix to be released, you can change line 212 of es2csv.py
like this and it will work:
csv_writer = csv.DictWriter(output_file, fieldnames=self.csv_headers, delimiter=unicode(self.opts.delimiter))
这篇关于无法为es2csv cli更改输出csv的定界符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!