-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Doc/df filter #12395
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
Doc/df filter #12395
Conversation
I've never understood exactly what the role of this method is - it seems to do a lot of stuff not very well, particularly when Is it worth looking at ( @cswarth thanks for the docs, they look much better imo) |
Yes, this is definitely worth considering -- maybe open another issue for this? My inclination would be to drop |
Bummer, all CI tests have failed on account of a failure in lint.sh https://travis-ci.org/pydata/pandas/jobs/110452254#L1231 It's failing on generic.py so this is probably my fault. I'm looking into this. |
you can run |
darn it, ignore this PR for now - I merged instead of rebasing. There really aren't 900+ changes here. |
A previous attempt that didn't get merged to clear up the sky on |
@cswarth for future reference, you don't need to close a PR if you screwed up a rebase. Just clean-up the branch (or make the branch again with the same name) and force push it again |
ah ok, thank you. I apologize for making such a simple task difficult. |
Yes, I think so. Also if you force pushed while the PR was closed, you cannot open it again (I find that a quite annoying thing of github) |
note we had quite a bit of discussion w.r.t. deprecateing filter/select here |
Updates doc comments for
DataFrame.filter
and adds usage examples.DataFrame.
filter
(items=None, like=None, regex=None, axis=None)¶Subset rows or columns of dataframe according to labels in the index.
Note that this routine does not filter a dataframe on its contents. The filter is applied to the labels of the index. This method is a thin veneer on top of DateFrame Select
items : list-like
like : string
regex : string (regular expression)
axis : int or None
same type as input object with filtered info axis
Notes
The
items
,like
, andregex
parameters should be mutually exclusive, but this is not checked.axis
defaults to the info axis that is used when indexing with[]
.Examples