【发布时间】:2019-02-05 07:51:45
【问题描述】:
我正在尝试使用 S3 中的 pyarrow 覆盖我的镶木地板文件。我看过文档,但没有找到任何东西。
这是我的代码:
from s3fs.core import S3FileSystem
import pyarrow as pa
import pyarrow.parquet as pq
s3 = S3FileSystem(anon=False)
output_dir = "s3://mybucket/output/my_table"
my_csv = pd.read_csv(file.csv)
my_table = pa.Table.from_pandas(my_csv , preserve_index=False)
pq.write_to_dataset(my_table,
output_dir,
filesystem=s3,
use_dictionary=True,
compression='snappy')
write_to_dataset 函数中是否有类似mode = "overwrite" 的选项?
【问题讨论】:
标签: python amazon-s3 pyarrow python-s3fs