-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Feature Request: regex for drop #4818
Comments
Nice. Perhaps on a more fundamental level, we could simply expose the |
We've talked a few times about moving min, max, & friends to a mixin so they can be used for Index as well as series, etc. We could try to do the same thing for |
I'm often doing things like
Would be great if I could just do |
fyi...you don't need the |
wouldn't |
Yeah, sure. Except regex isn't the default arg for filter (unfortunately). It's what I want 95% of the time. Also, not list-like enough for me
|
I think its trivial to allow
is their a reason didn't do this before? (this is not even a big API change and is backwards compatible) at the same time is their a reason at all for |
Is a slight API change, as atm you can do (though I guess this is break-able):
I had no idea what like arg did without checking source, it's basically just a subset of regex (in the spirit of SQL's like)... 👍 on taking string regex or list-like or a crit (a la select), and maybe dep the other args. I reckon alias select to filter and depreciate it (but not remove it). Happy to take this and do drop at the same time. |
Go for it! |
Ah, like is subtley different in that it converts stuff to string first (regex raises horribly if there is any non-strings)... e.g. if you have |
Also, select says above it "# TODO: Check if this was clearer in 0.12"... |
This function can be significantly simplified, and also work with dupe colnames. Any thoughts on a good argname (items is not that great)?
maybe labels (a la drop) |
crit? matcher? selection? |
I was thinking of unifying the args for filter and drop, so perhaps makes sense to use drop's args. see PR Is there an argument to keep filter rather than select? |
in theory 1 should apply to data (think query/select) i think somewhat arbitrary but filter already does labels |
also may want to post on mailing list to get some more feedback on this once u have a nice proposed API |
I just want to leave a simple one-liner (almost, if on emerges everything together) here, how one could do this. Drop all columns starting with "enc_":
|
closing as there hasn't been any uptake here (and I agree with the assessment that |
Don't have time to implement this, but I wanted to float the idea and park it. It's pretty trivial and you can achieve the same thing with filter, but it might be nice if drop had a regex keyword. E.g., these would be equivalent
The text was updated successfully, but these errors were encountered: