gpt4 book ai didi

python - 将 AWS Glue Python 与 NumPy 和 Pandas Python 程序包结合使用

转载 作者:太空狗 更新时间:2023-10-29 17:58:28 25 4
gpt4 key购买 nike

在 AWS 上名为 Glue 的新 ETL 工具中使用 NumPy 和 Pandas 等包的最简单方法是什么?我在 Python 中有一个完整的脚本,我想在利用 NumPy 和 Pandas 的 AWS Glue 中运行。

最佳答案

您可以检查使用此脚本作为粘合作业安装的最新 python 包

import logging
import pip
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

if __name__ == '__main__':
logger.info(pip._internal.main(['list']))

截至 2020 年 6 月 30 日 Glue as 已预安装这些 python 包。所以 numpypandas 都被涵盖了。

awscli 1.16.242
boto3 1.9.203
botocore 1.12.232
certifi 2020.4.5.1
chardet 3.0.4
colorama 0.3.9
docutils 0.15.2
idna 2.8
jmespath 0.9.4
numpy 1.16.2
pandas 0.24.2
pip 20.0.2
pyasn1 0.4.8
PyGreSQL 5.0.6
python-dateutil 2.8.1
pytz 2019.3
PyYAML 5.2
requests 2.22.0
rsa 3.4.2
s3transfer 0.2.1
scikit-learn 0.20.3
scipy 1.2.1
setuptools 45.1.0
six 1.14.0
urllib3 1.25.8
virtualenv 16.7.9
wheel 0.34.2

如果它们存在于用于构建附加 .whlrequirements.txt 中,您可以在 glue-python 中安装其他包。 whl 文件在您的脚本启动之前被收集并安装。我还建议您查看 Sagemaker Processing,这对于基于 python 的作业来说更容易。与 glue-python shell 的无服务器实例不同,您在那里不限于 16gb 的限制。

关于python - 将 AWS Glue Python 与 NumPy 和 Pandas Python 程序包结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46329561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com