[英]Power bi with Python
我目前正在研究 power bi 并尝试使用 python 脚本来编辑查询。 我在 Windows 系统中安装了 python 3.10 并将 power bi 定向到 python 文件。 只需编写一个非常简单的代码 import pandas as pd 即可。 Power bi 显示以下错误:请帮帮我。
enter code here
DataSource.Error: ADO.NET: A problem occurred while processing your Python script. Here are the technical details: [Expression.Error] The number is out of range of a 64 bit
integer value.
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=A problem occurred while processing your Python script.
Here are the technical details: [Expression.Error] The number is out of range of a 64 bit
integer value.
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException
你能展示一段你的python代码吗? 将更容易看出哪里出了问题。 如果没有,您可以进行一些检查,看看是否一切正常。
1:在您使用 Python 脚本的步骤之前,该表是否显示任何错误? 如果是这样,python 可能会抛出一些错误,因为 power bi 将表转储到数据帧,如果其中有错误,数据帧现在将不会如何表示它们。
2:首先在单独的编辑器中测试您的 Python 代码可能是个好主意(因此,制作一个虚拟 Dataframe 来代替您的表格,其中可能有几行,并确保您的脚本执行得很好(使用测试用例表中出现的最极端值)
3:确保将您想要的结果存储在熊猫数据框中。 Power BI 在执行后获取脚本中的所有 Dataframe 对象,并允许你将它们转储到 Power 查询表中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.