File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1370,3 +1370,28 @@ of the data values:
1370
1370
' weight' : [100 , 140 , 180 ],
1371
1371
' sex' : [' Male' , ' Female' ]})
1372
1372
df
1373
+
1374
+
1375
+ Load a file from S3
1376
+ -------------------
1377
+
1378
+ Pandas support loading files from a S3 bucket for remote file interactivity.
1379
+ You will be required to install the S3Fs _ library.
1380
+
1381
+ .. code-block :: python
1382
+
1383
+ df = pd.read_csv(' s3://baseballdatabank/core/Parks.csv' )
1384
+ df.head(1 )
1385
+
1386
+ If your S3 bucket requires cedentials you will need to set them as environment
1387
+ variables or in the ``~/.aws/credentials `` config file, refer to the `S3Fs
1388
+ documentation on credentials
1389
+ <https://s3fs.readthedocs.io/en/latest/#credentials> `_.
1390
+
1391
+ .. code-block :: shell
1392
+
1393
+ export AWS_ACCESS_KEY_ID = ' '
1394
+ export AWS_SECRET_ACCESS_KEY = ' '
1395
+ export AWS_SESSION_TOKEN = ' '
1396
+
1397
+ .. _S3Fs : https://pypi.org/project/s3fs/
You can’t perform that action at this time.
0 commit comments