File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,10 @@ def _is_label_like(key):
486
486
487
487
488
488
def _is_list_like (obj ):
489
- return np .iterable (obj ) and not isinstance (obj , basestring )
489
+ # Consider namedtuples to be not list like as they are useful as indices
490
+ return (np .iterable (obj )
491
+ and not isinstance (obj , basestring )
492
+ and not (isinstance (obj , tuple ) and type (obj ) is not tuple ))
490
493
491
494
492
495
def _need_slice (obj ):
Original file line number Diff line number Diff line change @@ -5122,7 +5122,6 @@ def test_stale_cached_series_bug_473(self):
5122
5122
5123
5123
def test_index_namedtuple (self ):
5124
5124
# Skipping until 1026 is properly resolved
5125
- raise nose .SkipTest
5126
5125
from collections import namedtuple
5127
5126
IndexType = namedtuple ("IndexType" , ["a" , "b" ])
5128
5127
idx1 = IndexType ("foo" , "bar" )
You can’t perform that action at this time.
0 commit comments