Feature Request: pd.DataFrame drop method to include function support · Issue #17129 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@jolespin

Description

@jolespin

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:

image