【发布时间】:2021-04-19 00:04:11
【问题描述】:
我有一个创建数据框的 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
【问题讨论】:
标签: python json pandas amazon-s3 aws-lambda