-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
API DesignClosing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsDeprecateFunctionality to remove in pandasFunctionality to remove in pandasNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actioninplaceRelating to inplace parameter or equivalentRelating to inplace parameter or equivalent
Description
The parameter inplace=False
should be deprecated across the board in preparation for pandas
2, which will not support that input (we will always return a copy). That would give people time to stop using it.
Thoughts?
Methods using inplace
:
Deprecation non controvertial (a copy will be made anyway, and inplace=True
does not add value):
- (Series/DataFrame).drop
- (Series/DataFrame).drop_duplicates
- (Series/DataFrame).dropna
- DataFrame.set_index (with
drop=False
wouldn't change the data, but that doesn't seem the main use case) - DataFrame.query
- DataFrame.eval
Not sure:
- (Series/DataFrame).sort_values
- (Series/DataFrame).sort_index
Should be able to not copy memory (under discussion on what to do):
- (Series/DataFrame).clip
- (Series/DataFrame).where
- (Series/DataFrame).fillna
- (Series/DataFrame).rename_axis
- (Series/DataFrame).reset_index
- (Series/DataFrame).replace
- (Series/DataFrame).set_axis
- (Series/DataFrame).mask
- (Series/DataFrame).interpolate
- DataFrame.rename
- Index.rename
- Index.set_names
- MultiIndex.set_levels
- MultiIndex.set_labels
- pandas.core.resample.Resampler.interpolate
Special cases:
- pandas.eval (with
inplace=False
the value is not returned but set to an argumenttarget
)
alimcmaster1, philipCrunchboards, GiorgioBalestrieri, shwina, johnnyheineken and 54 morelsloan, ivirshup, donielix, lorcan2440, hkad98 and 2 more
Metadata
Metadata
Assignees
Labels
API DesignClosing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsDeprecateFunctionality to remove in pandasFunctionality to remove in pandasNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actioninplaceRelating to inplace parameter or equivalentRelating to inplace parameter or equivalent