如何使Pyarrow CSV作者不添加围绕字符串的双引号

发布于 2025-02-03 12:38:27 字数 253 浏览 2 评论 0原文

我正在将箭头表写入CSV。

import pyarrow.csv as csv
csv.write_csv(table, 'myfile.csv', csv.WriteOptions(include_header=True,delimiter='|'))

但是,当我查看表格中的每个字符串类型的导出文件时,周围都有双引号。我已经用熊猫写了这张桌子给CSV,而双引号不存在。有什么方法可以用Pyarrow CSV作家避免这种情况?

I am writing an arrow table to csv like this.

import pyarrow.csv as csv
csv.write_csv(table, 'myfile.csv', csv.WriteOptions(include_header=True,delimiter='|'))

but when I look at the exported file every string type in the table has double quotes around it. I have written this table to csv with pandas and the double quotes are not there. Is there any way to avoid this with the pyarrow csv writer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文