We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In [1]: import pandas as pd In [2]: pd.__version__ Out[2]: '0.25.0' In [3]: s = pd.Series(["A1", "BC2", "DEF3"]) In [4]: s Out[4]: 0 A1 1 BC2 2 DEF3 dtype: object In [5]: s.str.slice(start=-1) Out[5]: 0 1 1 2 2 3 dtype: object In [6]: s.str[:-1] Out[6]: 0 A 1 BC 2 DEF dtype: object
It is not apparent from the documentation at https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.slice.html that you can specify negative values for the start and stop arguments. So I think this should be stated, as well as used in some examples (as shown above).
start
stop
N/A
pd.show_versions()
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Code Sample, a copy-pastable example if possible
Problem description
It is not apparent from the documentation at https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.slice.html that you can specify negative values for the
start
andstop
arguments. So I think this should be stated, as well as used in some examples (as shown above).Expected Output
N/A
Output of
pd.show_versions()
N/A
The text was updated successfully, but these errors were encountered: