-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
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
df.columns.str.match actually gives npt.NDArray[np.bool_], but mypy thinks it is pd.Index[str] #983
Labels
Strings
String extension data type and string data
Comments
Thanks for the report. The declaration of PR with tests welcome |
cmp0xff
added a commit
to cmp0xff/pandas-stubs
that referenced
this issue
Sep 1, 2024
2 tasks
cmp0xff
added a commit
to cmp0xff/pandas-stubs
that referenced
this issue
Sep 1, 2024
cmp0xff
added a commit
to cmp0xff/pandas-stubs
that referenced
this issue
Sep 4, 2024
cmp0xff
added a commit
to cmp0xff/pandas-stubs
that referenced
this issue
Sep 4, 2024
Dr-Irv
pushed a commit
that referenced
this issue
Sep 4, 2024
* fix(typing): #983 return type of StringMethods.match * feat(string): #983 tests for the fix * feat: #983 new TypeVar, following #990 (comment) * fix(comment): #983 use `np_ndarray_bool` from `pandas._typing` in stubs @Dr-Irv #990 (review)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
df.columns.str.match(reg_ex_pattern)
actually givesnpt.NDArray[np.bool_]
, but mypy thinks it'spd.Index[str]
To Reproduce
Provide a minimal runnable
pandas
example that is not properly checked by the stubs.Indicate which type checker you are using (
mypy
orpyright
).I am using
mypy
.Show the error message received from that type checker while checking your example.
Please complete the following information:
pandas-stubs
Additional context
Nothing
The text was updated successfully, but these errors were encountered: