【发布时间】:2019-11-10 05:58:20
【问题描述】:
我正在尝试在 PowerBI 中运行一个简单的 Python 脚本以使其正常工作,但它只会出现许多错误。我尝试过:
- 重新安装 Numpy 和 Matplotlib。
- 尝试使用 Python 3.5 和 3.6
- 卸载 Conda 并重新安装
我有一个显示我的问题的屏幕截图(它都适合下面的一个屏幕)。对于标记为“标签”和“数据”的 x 和 y,数据只是 a、b、c 和 1、2、3。
代码在这里:
# The following code to create a dataframe and remove duplicated rows is always executed and acts as
a preamble for your script:
dataset = pandas.DataFrame(Data, Label)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import matplotlib.pyplot as plt
dataset.plot(kind='scatter', x='Label', y='Data', color='red')
plt.show()
【问题讨论】:
-
脚本中的“a preamble for your script:”行被注释掉了
-
有没有注释掉dataset = pandas.DataFrame(Data, Label),然后运行
标签: python numpy anaconda powerbi-desktop