I'm trying to read a CSV file from a private S3 bucket to a pandas dataframe:
df = pandas.read_csv('s3://mybucket/file.csv')
I can read a file from a public bucket, but reading a file from a private bucket results in HTTP 403: Forbidden error.
I have configured the AWS credentials using aws configure.
I can download a file from a private bucket using boto3, which uses aws credentials. It seems that I need to configure pandas to use AWS credentials, but don't know how.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…