0
I’m trying to load multiple files that are on Amazon S3, I’m using Panda, Anaconda, but I’m in error.
bg = s3.Bucket("bucket")
objects = bg.objects.filter(Prefix="bucket/")
for obj in s3.Bucket('bucket').objects.all():
print (obj)
file_list = []
for obj in objects:
df = pd.read_csv(f's3://bucket/{obj.key}')
file_list.append(df)
final_df = pd.concat(file_list)
Output:
s3.ObjectSummary(bucket_name='bucket', key='codigo_python.txt')
s3.ObjectSummary(bucket_name='bucket', key='codigo_python_V2.txt')
Error message
ValueError: No objects to concatenate
The value of Objects should not be
s3.Bucket('bucket').objects.all()
??? That is to sayobjects = s3.Bucket('bucket').objects.all()
and thenfor object in objects
?– Paulo Marques
Changed and now what returns is Emptydataerror: No Columns to parse from file
– user223488