Skip to content

Commit 4471700

Browse files
committed
Add test for __getitem__ syntax on str
1 parent f2087df commit 4471700

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/test_strings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,10 @@ def test_string_slice_get_syntax(self):
11711171
expected = s.str.slice(stop=3)
11721172
assert_series_equal(result, expected)
11731173

1174+
result = s.str[2::-1]
1175+
expected = s.str.slice(start=2, step=-1)
1176+
assert_series_equal(result, expected)
1177+
11741178
def test_string_slice_out_of_bounds(self):
11751179
s = Series([(1, 2), (1,), (3,4,5)])
11761180

0 commit comments

Comments
 (0)