butter_prices
Almond butter Peanut butter Cashew butter
Price 10 8 12
weekly_sales
Almonds butter Peanut butter Cashew butter
Mon 12 15 0
Tues 3 3 7
Wed 9 19 18
Thurs 4 6 12
Fri 1 6 7
现在,在做
butter_prices.shape, weekly_sales.shape
((1, 3), (5, 3))
现在计算时显示错误
butter_prices.dot(weekly_sales.T)
ValueError: matrices are not aligned
应为2的点积
2条答案
按热度按时间f0brbegy1#
通过
values
或对齐名称
vof42yt12#
您在列名称
Almonds butter
->Almond butter
中有拼写错误:图纸: