House_prices = [10050, 42300, 50206, 105000, 22350]
Num_rooms = [4, 5, 6, 10, 12, 2]
code
#This is the code that I have tried:
x = df.House_prices
y = df.Num_rooms
plt.scatter(x,y)
plt.show()
我想把"House_prices"
和"Num_rooms"
绘制成散点图。但是我遇到了这个错误'list' object has no attribute 'House_prices'
我不知道出了什么问题,我需要一些帮助来找出问题所在。哪一部分我错了?它是上半部分:"x = df.House_prices" and "y = df.Num_rooms"
因此,首先创建一个x轴数组或列表。我用numpy做的
相关问题 更多 >
编程相关推荐