Skip to content
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

Closed

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Mar 24, 2017

Deprecated in 0.11.0.

xref #12027.

@codecov
Copy link

codecov bot commented Mar 24, 2017

Codecov Report

Merging #15798 into master will decrease coverage by <.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
pandas/computation/pytables.py 92.35% <85.71%> (+1.59%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/common.py 90.96% <0%> (-0.34%) ⬇️
pandas/core/frame.py 97.86% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d3554c...06adda1. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Mar 24, 2017

lgtm. can you add a deprecation removal note. ping when pushed.

@jreback
Copy link
Contributor

jreback commented Mar 24, 2017

also this might still be used in the doc-build (though I think I took most of this out). can you check?

@jreback jreback added Deprecate Functionality to remove in pandas IO HDF5 read_hdf, HDFStore labels Mar 24, 2017
@jreback jreback added this to the 0.20.0 milestone Mar 24, 2017
@gfyoung
Copy link
Member Author

gfyoung commented Mar 24, 2017

@jreback : I don't see any AFAICT.

Copy link
Contributor

@jreback jreback left a 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")

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Done.


# try to be back compat
where = self.parse_back_compat(where, op, value)
_validate_where(where)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where = _validate_where(where)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Done.

@jreback
Copy link
Contributor

jreback commented Mar 25, 2017

thanks @gfyoung

@gfyoung gfyoung deleted the where-string-enforce branch March 25, 2017 20:49
mattip pushed a commit to mattip/pandas that referenced this pull request Apr 3, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas IO HDF5 read_hdf, HDFStore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants