我有一个 AWS Lambda 函数,用于创建数据框,我需要将该文件写入 S3 存储桶。
import pandas as pd
import boto3
import io
# code to get the df
destination = "output_" + str(datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S')) + '.json'
df.to_json(destination) # this file should be written to S3 bucket
df.to_json
部分相符,而这对我的问题来说是必须的。谢谢。 - kevin_theinfinityfund