python中画柱状图时TypeError: unsupported operand type(s) for -: 'str' and 'float'

求解答!这个怎么解决啊本来能运行换了anacondas3 就出现这样错误l!

img

img

写成这样:

import pandas as pd
import matplotlib.pyplot as plt
kw=pd.Series([456,389,487,436],index=['python','c++','go','java'])
plt.bar(kw.index,kw.values,data=kw)
plt.show()

另外升级一下matplotlib库,看其中的语法还是python2的用法

```

img

意思是减号一边是字符串一边是float类型,都转成一样的类型就好了

请问解决了吗?我也遇到同样的问题