“PANDAS BACA S3 Objek di Jupyter Notebook” Kode Jawaban

PANDAS BACA S3 Objek di Jupyter Notebook

import s3fs

# csv file
df = pd.read_csv('s3://{bucket_name}/{path_to_file}')

# parquet file
df = pd.read_parquet('s3://{bucket_name}/{path_to_file}')
Vinoo Palayoor

PANDAS BACA S3 Objek di Jupyter Notebook

import boto3
s3_resource = boto3.resource('s3')
bucket = s3_resource.Bucket(name='{bucket_name}')
for file in bucket.objects.all():
    # do what you want with the files
    # for example:
    if 'filter' in file.key:
        print(file.key)
        new_df = pd.read_csv('s3:://{bucket_name}/{}'.format(file.key))
Vinoo Palayoor

Jawaban yang mirip dengan “PANDAS BACA S3 Objek di Jupyter Notebook”

Pertanyaan yang mirip dengan “PANDAS BACA S3 Objek di Jupyter Notebook”

Lebih banyak jawaban terkait untuk “PANDAS BACA S3 Objek di Jupyter Notebook” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya