Closed
Description
The step
argument in the slice
StringMethods has no effect:
In [18]: s = pd.Series(['abcde', 'fghij'])
In [19]: s.str.slice?
Definition: s.str.slice(self, start=None, stop=None, step=1)
Slice substrings from each element in array
Parameters
----------
start : int or None
stop : int or None
Returns
-------
sliced : array
In [22]: s.str.slice(step=1)
Out[22]:
0 abcde
1 fghij
dtype: object
In [23]: s.str.slice(step=2)
Out[23]:
0 abcde
1 fghij
dtype: object
In [24]: s[0][::2]
Out[24]: 'ace'