我正在尝试读取aws s3中的分区数据集,看起来像:
MyDirectory--code=1--file.parquet
--code=2--another.parquet
--code=3--another.parquet
我创建了一个file_list,其中包含该目录中所有文件的路径,然后执行
df = pq.Parquetdataset(file_list,filesystem=fs).read().to_pandas()
除分区列代码在数据帧df中不存在外,所有其他操作均有效。 我也尝试使用file_list插入MyDirectory的一个路径来尝试它,但是发现一个错误 “在中间目录中找到文件:s3:// bucket / Mydirectoty”,我在网上找不到任何答案。
谢谢!