如何解决将 PySpark 数据帧列表写入 S3 存储桶
在 this 帖子中,给出了如何在 S3 buckwt 中存储列表的说明:
import boto3
import pickle
s3 = boto3.client('s3')
myList=[1,2,3,4,5]
#Serialize the object
serializedListObject = pickle.dumps(myList)
#Write to Bucket named 'mytestbucket' and
#Store the list using key myList001
s3.put_object(Bucket='mytestbucket',Key='myList001',Body=serializedListObject)
现在假设我们要在 S3 存储桶中存储 PySpark 数据帧列表。我收到以下错误:Py4JError: An error occurred while calling o19570.__getstate__. Trace:
我错过了什么?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。