python - 在 Azure Functions 中使用 Pandas

标签 python azure azure-functions

尝试创建一个基本的Python函数并在Azure函数应用程序中使用它(基于消耗)。通过 VS Code 使用 HTTP 模板,并能够在 Azure 上使用和部署它。然而,当我尝试在逻辑中使用“Pandas”时,我收到了无法纠正的错误。我是Python的菜鸟。您能建议如何纠正吗?

使用的工具:VS Code、Azure Functions 工具 本地安装的Python版本:3.8.5 Azure函数应用程序Python版本:3.8

enter image description here

enter image description here

最佳答案

您在 Azure 上的函数中似乎尚未安装 pandas 模块。您需要将 pandas 模块添加到本地 requirements.txt 中,然后将函数从本地部署到 azure。它将根据 requirements.txt 中的行安装模块。

您可以在“终端”窗口中运行此命令,以自动在 requirements.txt 中生成 pandas 行。

pip freeze > requirements.txt

运行上面的命令后,您的 requirements.txt 应如下所示:

enter image description here

关于python - 在 Azure Functions 中使用 Pandas,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63500963/

相关文章:

python - 在 Pandas 中转换日期/时间

python - pytrends(谷歌趋势)每日频率

python - Python 中的 Azure 计费 API - 空响应

ios - Azure AD Graph 获取用户 REST API 调用无法返回用户实体缩略图字段

Azure函数: A way to trigger other Azurefunction in a http-trigger azure function?

Azure 函数 CosmosDbTrigger(从头开始选项)

c# - Azure Functions 是否适合拆分大型处理作业?

Python 前置的加等于运算符

azure - 在 Azure Service Fabric 应用程序中存储配置值的位置

Azure CLI 无法从模板创建门户仪表板