@@ -2102,12 +2102,12 @@ def test_split_with_name(self):
2102
2102
idx = Index (['a,b' , 'c,d' ], name = 'xxx' )
2103
2103
res = idx .str .split (',' )
2104
2104
exp = Index ([['a' , 'b' ], ['c' , 'd' ]], name = 'xxx' )
2105
- assert res .nlevels , 1
2105
+ assert res .nlevels == 1
2106
2106
tm .assert_index_equal (res , exp )
2107
2107
2108
2108
res = idx .str .split (',' , expand = True )
2109
2109
exp = MultiIndex .from_tuples ([('a' , 'b' ), ('c' , 'd' )])
2110
- assert res .nlevels , 2
2110
+ assert res .nlevels == 2
2111
2111
tm .assert_index_equal (res , exp )
2112
2112
2113
2113
def test_partition_series (self ):
@@ -2247,13 +2247,13 @@ def test_partition_with_name(self):
2247
2247
idx = Index (['a,b' , 'c,d' ], name = 'xxx' )
2248
2248
res = idx .str .partition (',' )
2249
2249
exp = MultiIndex .from_tuples ([('a' , ',' , 'b' ), ('c' , ',' , 'd' )])
2250
- assert res .nlevels , 3
2250
+ assert res .nlevels == 3
2251
2251
tm .assert_index_equal (res , exp )
2252
2252
2253
2253
# should preserve name
2254
2254
res = idx .str .partition (',' , expand = False )
2255
2255
exp = Index (np .array ([('a' , ',' , 'b' ), ('c' , ',' , 'd' )]), name = 'xxx' )
2256
- assert res .nlevels , 1
2256
+ assert res .nlevels == 1
2257
2257
tm .assert_index_equal (res , exp )
2258
2258
2259
2259
def test_pipe_failures (self ):
0 commit comments