title: Grouper and axis must be same length in Python
body: <p>I am a beginner of Python, and I study a textbook to learn the Pandas module.
  I have a dataframe called Berri_bike, and it is from the following code:</p>
  
  <pre><code>  bike_df=pd.read_csv(os.path.join(path,'comptagevelo2012.csv'),parse_dates=['Date'],\
                            encoding='latin1',dayfirst=True,index_col='Date')
  
  
  
    Berri_bike=bike_df['Berri1'].copy() # get only the column='Berri1'
  
    Berri_bike['Weekday']=Berri_bike.index.weekday
  
    weekday_counts = Berri_bike.groupby('Weekday').aggregate(sum)
    weekday_counts
  </code></pre>
  
  <p>I have 3 columns in my Berri_bilk , a data index- from 1/1/2012 to 12/31/2012, and value column with numbers for each data, and a weekday column I assigned to it. But when I want to group by the values, I got the error: ValueError: Grouper and axis must be same length, I am not sure what this mean, what I want to do is very simple, like in SQL, sum(value) grouped weekday... can anyone please let me know what happended here?</p>
  
  <p><a href="https://i.stack.imgur.com/PJ54t.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJ54t.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/EbD4O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EbD4O.jpg" alt="enter image description here"></a></p>