Feature Request: pd.DataFrame drop method to include function support · Issue #17129 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I think it would be useful if the pd.DataFrame
's drop
method could support a lambda
or function
that one can use as a filter such as below:
Also, on a side note I noticed that masking requires an extra step in the newest pandas in that it requires the mask to be converted to an array and then to a boolean. Not sure if that warrants an issue in itself but just wanted to mention that. It is also shown below: