- SDK version
Python 3.9
pandas 1.3.1
- Sample code
# coding: utf-8
# author: qbit
# date: 2021-08-08
# summary: pandas 直接读取中国区 s3 文件
import pandas as pd
s3options = {
"client_kwargs": {"region_name": "cn-northwest-1"}, # 中国宁夏区
"key": "aws_access_key_id",
"secret": "aws_secret_access_key",
}
# 如果操作系统已配置命令行可访问 s3
# 可以不用 storage_options 参数
df = pd.read_csv(
"s3://qbit-cn-northwest-1/data/word.csv", storage_options=s3options
)
print(df.head())
This article is from qbit snap
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。