Closed
Description
Describe the bug
The stubs for pandas_stubs.core.strings.StringMethods.rsplit
includes a regex: bool
parameter. The function pandas.Series.str.rsplit
contains no such parameter.
To Reproduce
ser = pd.Series(["foo.bar.baz", "qux.foobar"])
ser.str.rsplit(".", regex=False)
I'm using pyright
, which does not raise any error, even though it should since actually running the code results in TypeError: StringMethods.rsplit() got an unexpected keyword argument 'regex'
.
Please complete the following information:
- OS: MacOS
- OS Version: Sonoma 14.6.1
- Python 3.12.1
- pyright 1.1.389
- pandas-stubs 2.2.3.241009
Additional context
The confusion seems to stem from the fact that the parallel method pandas.Series.str.split
does include a regex: bool
parameter.