Ensure two Pandas DatetimeIndexes are the same?
Question: I have run into an issue when comparing two `DatetimeIndex`'s with different
lengths in an `assert` like the following:

    
    
    In [1]: idx1 = pd.date_range('2010-01-01','2010-12-31',freq='D')
    
    In [2]: idx2 = pd.date_range('2010-01-01','2010-11-01',freq='D')
    
    In [3]: assert (idx1 == idx2).all()
    

I get the error:

    
    
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-17-ad2cfd6d11c2> in <module>()
    ----> 1 assert (idx1 == idx2).all()
    
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.10.1.dev_dcd9df7-py2.7-macosx-10.8-x86_64.egg/pandas/tseries/index.pyc in wrapper(self, other)
         75         result = func(other)
         76 
    ---> 77         return result.view(np.ndarray)
         78 
         79     return wrapper
    
    AttributeError: 'NotImplementedType' object has no attribute 'view'
    

Which is fine if this is not implemented, yet, but is there some **pandas**
way of doing this?

**Note:** I have used the following with success:

    
    
    In [3]: assert list(idx1) == list(idx2)
    

So, the following also works:

    
    
    In [3]: assert list(df.index) == list(testindex)
    

But I would like to know if there is a more `pandas`-ish way of doing this.


Answer: 
    In [1]: import pandas as pd
    
    In [2]: idx1 = pd.date_range('2010-01-01','2010-12-31',freq='D')
    
    In [3]: idx2 = pd.date_range('2010-01-01','2010-11-01',freq='D')
    
    In [4]: idx3 = pd.date_range('2010-01-01','2010-12-31',freq='D')
    
    In [5]: help(idx1.equals)
    Help on method equals in module pandas.tseries.index:
    
    equals(self, other) method of pandas.tseries.index.DatetimeIndex instance
        Determines if two Index objects contain the same elements.
    
    
    In [6]: print(idx1.equals(idx2))
    False
    
    In [7]: print(idx1.equals(idx3))
    True
    

