Feature Request: regex for drop
See original GitHub issueDon’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
df = df.filter(regex="^(?!var_start)")
df = df.drop(regex="^var_start", axis=1)
Issue Analytics
- State:
- Created 10 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
Regular expression search in developer console - chromium
Issue 418406: Feature request: Regular expression search in ... I miss the ability to search for (multi-line) regular expressions in the ...
Read more >How do we drop partitions in hive with regex. Is it possible?
I am trying to run the following alter table historical_data drop partition (my_date not rlike '[A-Za ...
Read more >[Feature Request] Allow use of regular expressions in search ...
[Feature Request] Allow use of regular expressions in search pattern ... use of regular expressions when searching text with the / command.
Read more >Regex filter Variable drop down - Grafana Community
When selecting a variable using the drop down list at the top of a ... way to get regex search functionality, or is...
Read more >Working with regex match conditions - AWS Documentation
You can add multiple regular expressions to a single pattern set. If you do so, those expressions are combined with an OR. That...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tik0 you can use a regex to do that. Something like:
@jreback this is a pretty old issue but I think it’s duplicative of what’s available already in filter. Any reason to keep this one open?
closing as there hasn’t been any uptake here (and I agree with the assessment that
df.filter(regex=r'^(?!enc_)')
is simple enough), though please do ping if you have use-case where that isn’t practical