[英]Error while running python script in power bi desktop
'm trying to use python scripting in power bi.我正在尝试在 power bi 中使用 python 脚本。 I am referring documentation: here and here ;
我指的是文档: 这里和这里;
also confirming of installing appropriate packages in the folder,还确认在文件夹中安装适当的包,
Identifying directory using where python
and my installation directory is C:\USERS\ABC\ANACONDA3
使用
where python
识别目录,我的安装目录是C:\USERS\ABC\ANACONDA3
I am using an example script provided here我正在使用此处提供的示例脚本
import pandas as pd
df = pd.DataFrame({
'Fname':['Harry','Sally','Paul','Abe','June','Mike','Tom'],
'Age':[21,34,42,18,24,80,22],
'Weight': [180, 130, 200, 140, 176, 142, 210],
'Gender':['M','F','M','M','F','M','M'],
'State':['Washington','Oregon','California','Washington','Nevada','Texas','Nevada'],
'Children':[4,1,2,3,0,2,0],
'Pets':[3,2,2,5,0,1,5]
})
print (df)
Looks like you don't have panda installed.看起来你没有安装熊猫。
You could first check in your C:\Users\abc\AppData\Local\Programs\Python\Python39\Lib\site-packages that you indeed have the panda package available.你可以先检查你的 C:\Users\abc\AppData\Local\Programs\Python\Python39\Lib\site-packages 你确实有熊猫 package 可用。
If not, you can install it using this command: py -m pip install pandas
如果没有,您可以使用以下命令安装它:
py -m pip install pandas
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.