-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
MAINT: Enforce string type for where parameter #15798
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15798 +/- ##
==========================================
- Coverage 91.01% 91% -0.01%
==========================================
Files 143 143
Lines 49400 49370 -30
==========================================
- Hits 44963 44931 -32
- Misses 4437 4439 +2
Continue to review full report at Codecov.
|
lgtm. can you add a deprecation removal note. ping when pushed. |
also this might still be used in the doc-build (though I think I took most of this out). can you check? |
@jreback : I don't see any AFAICT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm minor comment
if not (isinstance(w, (Expr, string_types)) or is_list_like(w)): | ||
raise TypeError("where must be passed as a string, Expr, " | ||
"or list-like of Exprs") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could return w here
makes it a bit more natural to use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Done.
pandas/computation/pytables.py
Outdated
|
||
# try to be back compat | ||
where = self.parse_back_compat(where, op, value) | ||
_validate_where(where) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where = _validate_where(where)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Done.
Deprecated in 0.11.0. xref pandas-devgh-12027.
eb6071f
to
06adda1
Compare
thanks @gfyoung |
Deprecated in 0.11.0. xref pandas-dev#12027. Author: gfyoung <gfyoung17@gmail.com> Closes pandas-dev#15798 from gfyoung/where-string-enforce and squashes the following commits: 06adda1 [gfyoung] MAINT: Enforce string type for where parameter
Deprecated in 0.11.0.
xref #12027.