title: ValueError: Can only compare identically-labeled Series objects: python
body: <p>I have the following code:</p>
  
  <pre><code>data = pd.read_csv('data/C2A2_data/BinnedCsvs_d400/fb441e62df2d58994928907a91895ec62c2c42e6cd075c2700843b89.csv') 
  newdata = data[(data['Date'] &gt;= '2005-01-01') &amp; (data['Date'] &lt;= '2014-12-12')]
  #time = pd.date_range('2005-01-01','2014-12-12',freq='D').strftime('%Y-%m-%d')
  datamax = newdata[newdata['Element']=='TMAX']
  datamin = newdata[newdata['Element']=='TMIN']
  datamax = datamax.groupby('Date').max()
  datamin = datamin.groupby('Date').min()
  datamax = datamax.reset_index()
  datamin = datamin.reset_index()
  datamax = datamax[~datamax['Date'].str.contains("02-29")]
  datamin = datamin[~datamin['Date'].str.contains("02-29")]
  
  #2015 data 
  breakoutdata = data[(data['Date']  &gt; '2014-12-12')]
  datamax2015 = breakoutdata[breakoutdata['Element']=='TMAX']
  datamin2015 = breakoutdata[breakoutdata['Element']=='TMIN']
  datamax2015 = datamax2015.groupby('Date').max()
  datamin2015 = datamin2015.groupby('Date').min()
  datamax2015 = datamax2015.reset_index()
  datamin2015 = datamin2015.reset_index()
  datamax2015 = datamax2015[~datamax2015['Date'].str.contains("02-29")]
  datamin2015 = datamin2015[~datamin2015['Date'].str.contains("02-29")]
  </code></pre>
  
  <p>However, I keep getting the error: <strong>ValueError: Can only compare identically-labeled Series objects</strong></p>
  
  <p>I am confused as to why this is.</p>
  
  <p>The dataframe datamax2015 looks like this:</p>
  
  <pre><code>Date           ID Element  Data_Value
  0    2014-12-13  USW00094889    TMAX          89
  1    2014-12-14  USW00094889    TMAX         139
  2    2014-12-15  USW00094889    TMAX         128
  3    2014-12-16  USW00094889    TMAX         139
  4    2014-12-17  USW00094889    TMAX         122
  5    2014-12-18  USW00094889    TMAX          22
  6    2014-12-19  USW00094889    TMAX          11
  7    2014-12-20  USW00094889    TMAX           6
  8    2014-12-21  USW00094889    TMAX          33
  9    2014-12-22  USW00094889    TMAX          61
  10   2014-12-23  USW00094889    TMAX         122
  11   2014-12-24  USW00094889    TMAX         139
  12   2014-12-25  USW00094889    TMAX         100
  13   2014-12-26  USW00094889    TMAX         100
  14   2014-12-27  USW00094889    TMAX         111
  15   2014-12-28  USW00094889    TMAX         133
  16   2014-12-29  USW00094889    TMAX          89
  17   2014-12-30  USW00094889    TMAX          33
  18   2014-12-31  USW00094889    TMAX         -28
  19   2015-01-01  USW00094889    TMAX          11
  20   2015-01-02  USW00094889    TMAX          39
  21   2015-01-03  USW00014853    TMAX          39
  22   2015-01-04  USW00094889    TMAX          44
  23   2015-01-05  USW00094889    TMAX          28
  24   2015-01-06  USW00094889    TMAX          33
  25   2015-01-07  USW00094889    TMAX         -67
  26   2015-01-08  USW00094889    TMAX         -82
  27   2015-01-09  USW00094889    TMAX         -66
  28   2015-01-10  USW00094889    TMAX         -71
  29   2015-01-11  USW00094889    TMAX           6
  ..          ...          ...     ...         ...
  354  2015-12-02  USW00094889    TMAX         100
  355  2015-12-03  USW00094889    TMAX          94
  356  2015-12-04  USW00094889    TMAX          94
  357  2015-12-05  USW00094889    TMAX          94
  358  2015-12-06  USW00094889    TMAX         100
  359  2015-12-07  USW00094889    TMAX         100
  360  2015-12-08  USW00094889    TMAX         100
  361  2015-12-09  USW00094889    TMAX         122
  362  2015-12-10  USW00094889    TMAX         150
  363  2015-12-11  USW00094889    TMAX         156
  364  2015-12-12  USW00094889    TMAX         200
  365  2015-12-13  USW00094889    TMAX         194
  366  2015-12-14  USW00094889    TMAX         183
  367  2015-12-15  USW00094889    TMAX         161
  368  2015-12-16  USW00094889    TMAX         150
  369  2015-12-17  USW00094889    TMAX         122
  370  2015-12-18  USW00094889    TMAX          33
  371  2015-12-19  USW00094889    TMAX          11
  372  2015-12-20  USW00094889    TMAX          83
  373  2015-12-21  USW00094889    TMAX         122
  374  2015-12-22  USW00014853    TMAX         133
  375  2015-12-23  USW00014853    TMAX         183
  376  2015-12-24  USW00014853    TMAX         172
  377  2015-12-25  USW00094889    TMAX         111
  378  2015-12-26  USW00094889    TMAX         117
  379  2015-12-27  USW00094889    TMAX          83
  380  2015-12-28  USW00094889    TMAX          61
  381  2015-12-29  USW00094889    TMAX         100
  382  2015-12-30  USW00094889    TMAX          67
  383  2015-12-31  USW00094889    TMAX          17
  
  [384 rows x 4 columns]
  </code></pre>
  
  <p>The dataframe datamax looks like this:</p>
  
  <pre><code>     Date           ID Element  Data_Value
  0     2005-01-01  USW00094889    TMAX         156
  1     2005-01-02  USW00094889    TMAX         139
  2     2005-01-03  USW00094889    TMAX         133
  3     2005-01-04  USW00094889    TMAX          39
  4     2005-01-05  USW00094889    TMAX          33
  5     2005-01-06  USW00094889    TMAX           0
  6     2005-01-07  USW00094889    TMAX           6
  7     2005-01-08  USW00094889    TMAX          17
  8     2005-01-09  USW00094889    TMAX          28
  9     2005-01-10  USW00094889    TMAX          44
  10    2005-01-11  USW00094889    TMAX          44
  11    2005-01-12  USW00094889    TMAX         139
  12    2005-01-13  USW00094889    TMAX         161
  13    2005-01-14  USW00094889    TMAX         150
  14    2005-01-15  USW00094889    TMAX         -33
  15    2005-01-16  USW00094889    TMAX         -33
  16    2005-01-17  USW00094889    TMAX         -50
  17    2005-01-18  USW00094889    TMAX         -33
  18    2005-01-19  USW00094889    TMAX          11
  19    2005-01-20  USW00094889    TMAX          11
  20    2005-01-21  USW00094889    TMAX         -39
  21    2005-01-22  USW00094889    TMAX         -72
  22    2005-01-23  USW00094889    TMAX         -44
  23    2005-01-24  USW00094889    TMAX          11
  24    2005-01-25  USW00094889    TMAX          28
  25    2005-01-26  USW00094889    TMAX          28
  26    2005-01-27  USW00094889    TMAX           6
  27    2005-01-28  USW00094889    TMAX         -11
  28    2005-01-29  USW00094889    TMAX          17
  29    2005-01-30  USW00094889    TMAX          28
  ...          ...          ...     ...         ...
  3603  2014-11-13  USW00094889    TMAX          39
  3604  2014-11-14  USW00094889    TMAX          33
  3605  2014-11-15  USW00094889    TMAX          28
  3606  2014-11-16  USW00094889    TMAX          28
  3607  2014-11-17  USW00094889    TMAX          17
  3608  2014-11-18  USW00094889    TMAX          11
  3609  2014-11-19  USW00094889    TMAX          11
  3610  2014-11-20  USW00094889    TMAX           6
  3611  2014-11-21  USW00094889    TMAX         -10
  3612  2014-11-22  USW00094889    TMAX         106
  3613  2014-11-23  USW00094889    TMAX         156
  3614  2014-11-24  USW00094889    TMAX         172
  3615  2014-11-25  USW00094889    TMAX         172
  3616  2014-11-26  USW00094889    TMAX          28
  3617  2014-11-27  USW00094889    TMAX          39
  3618  2014-11-28  USW00094889    TMAX          22
  3619  2014-11-29  USW00094889    TMAX         117
  3620  2014-11-30  USW00094889    TMAX         178
  3621  2014-12-01  USW00094889    TMAX         172
  3622  2014-12-02  USW00094889    TMAX          33
  3623  2014-12-03  USW00094889    TMAX          61
  3624  2014-12-04  USW00094889    TMAX          50
  3625  2014-12-05  USW00094889    TMAX          50
  3626  2014-12-06  USW00094889    TMAX          67
  3627  2014-12-07  USW00094889    TMAX          67
  3628  2014-12-08  USW00094889    TMAX          72
  3629  2014-12-09  USW00094889    TMAX          56
  3630  2014-12-10  USW00094889    TMAX          50
  3631  2014-12-11  USW00094889    TMAX          61
  3632  2014-12-12  USW00094889    TMAX          50
  
  [3631 rows x 4 columns]
  </code></pre>
  
  <p>The columns seem to be the same in both dataframes. </p>
  
  <p>I tried resorting the indices in both these dataframes but this did not work. </p>