Closed
Description
Code Sample, a copy-pastable example if possible
In [108]: i = pd.Index([])
In [109]: bool(i)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-109-43b3c3723ad4> in <module>()
----> 1 bool(i)
C:\Users\Chris\Anaconda\envs\py35\lib\site-packages\pandas\indexes\base.py in __nonzero__(self)
1227 raise ValueError("The truth value of a {0} is ambiguous. "
1228 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
-> 1229 .format(self.__class__.__name__))
1230
1231 __bool__ = __nonzero__
ValueError: The truth value of a Index is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
In [110]: i.empty
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-110-1524e0ba750e> in <module>()
----> 1 i.empty
AttributeError: 'Index' object has no attribute 'empty'