Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Pandas 数据框,我试图将它作为镶木地板文件保存到 S3 中:
dftest = pd.DataFrame({'field': [1,2,3]}) dftest.to_parquet("s3://bucket_name/test.parquet", engine='pyarrow', compression='gzip')
我得到:“FileNotFoundError:bucket_name/test.parquet”
虽然我仍然无法让 pandas.DataFrame.to_parquet 方法与 S3 一起使用,但我确实找到了似乎可行的不同解决方案:
import s3fs from fastparquet import write s3 = s3fs.S3FileSystem() myopen = s3.open write('s3://bucketname/test.parquet', dftest, compression='GZIP', open_with=myopen)