You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
The
step
argument in theslice
StringMethods has no effect:The text was updated successfully, but these errors were encountered: