我要做的是将所有文件从S3(亚马逊网络服务存储)转换为parquet格式,并将它们重新保存到s3中。
我不能从s3转换所有的文件。请帮帮我!!
import boto3
import pandas as pd
import pyarrow as pa
from s3fs import S3FileSystem
import pyarrow.parquet as pq
s3 = boto3.client('s3',region_name='us-east-2')
obj = s3.get_object(Bucket='dstest-s3', K
我正在尝试读取S3桶中的csv文件。我想做一些操作,然后最后转换成一个动态数据,并将其写回S3。
这就是我迄今尝试过的:
纯Python:
Val1=""
Val2=""
cols=[]
width=[]
with open('s3://demo-ETL/read/data.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
pri
背景:在AWS Lambda中使用python将csv文件发送到s3。 问题:无法让Boto3接受我的csv文件或csv.reader对象。 示例: # writing to csv file
with open('/tmp/' + output_file_name, 'a+') as csvfile:
for row in csv_reader:
# ... do data manipulation
csv.DictWriter(csvfile, fieldnames=fields)
# read and send