ValueError shape mismatch: objects cannot be broadcast to a single shape

前端 未结 1 1560
故里飘歌
故里飘歌 2021-01-23 13:24

This is my code that I plan to use for creating a BAR chart.Ignore next line.I am writing this just to balance the code and details .

import numpy as np
import pa         


        
1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-23 14:11

    Just change

    x=np.arange(11)
    
    to 
    
    x = np.arange(len(df))
    

    and

    plt.xticks(np.arange(11),Countries,rotation=30) 
    
    to
    
    plt.xticks(x,Countries,rotation=30) 
    
    

    0 讨论(0)
提交回复
热议问题