diff --git a/pandas/core/frame.py b/pandas/core/frame.py index d563aa8b06ca5..fd1f7a3767b33 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -240,7 +240,7 @@ If 1 or 'columns': apply function to each row.""", "inplace": """ inplace : bool, default False - If True, performs operation inplace and returns None.""", + Whether to modify the DataFrame rather than creating a new one.""", "optional_by": """ by : str or list of str Name or list of names to sort by. @@ -4071,8 +4071,7 @@ def query(self, expr: str, inplace: bool = False, **kwargs): Expanding functionality of backtick quoting for more than only spaces. inplace : bool - Whether the query should modify the data in place or return - a modified copy. + Whether to modify the DataFrame rather than creating a new one. **kwargs See the documentation for :func:`eval` for complete details on the keyword arguments accepted by :meth:`DataFrame.query`. @@ -5175,8 +5174,8 @@ def rename( copy : bool, default True Also copy underlying data. inplace : bool, default False - Whether to return a new DataFrame. If True then value of copy is - ignored. + Whether to modify the DataFrame rather than creating a new one. + If True then value of copy is ignored. level : int or level name, default None In case of a MultiIndex, only rename labels in the specified level. @@ -5607,7 +5606,7 @@ def set_index( append : bool, default False Whether to append columns to existing index. inplace : bool, default False - If True, modifies the DataFrame in place (do not create a new object). + Whether to modify the DataFrame rather than creating a new one. verify_integrity : bool, default False Check the new index for duplicates. Otherwise defer the check until necessary. Setting to False will improve the performance of this @@ -5884,7 +5883,7 @@ def reset_index( Do not try to insert index into dataframe columns. This resets the index to the default integer index. inplace : bool, default False - Modify the DataFrame in place (do not create a new object). + Whether to modify the DataFrame rather than creating a new one. col_level : int or str, default 0 If the columns have multiple levels, determines which level the labels are inserted into. By default it is inserted into the first @@ -6171,7 +6170,7 @@ def dropna( Labels along other axis to consider, e.g. if you are dropping rows these would be a list of columns to include. inplace : bool, default False - If True, do operation inplace and return None. + Whether to modify the DataFrame rather than creating a new one. Returns ------- @@ -6317,7 +6316,7 @@ def drop_duplicates( - ``last`` : Drop duplicates except for the last occurrence. - False : Drop all duplicates. inplace : bool, default False - Whether to drop duplicates in place or to return a copy. + Whether to modify the DataFrame rather than creating a new one. ignore_index : bool, default False If True, the resulting axis will be labeled 0, 1, …, n - 1. @@ -6691,7 +6690,7 @@ def sort_index( # type: ignore[override] Sort ascending vs. descending. When the index is a MultiIndex the sort direction can be controlled for each level individually. inplace : bool, default False - If True, perform operation in-place. + Whether to modify the DataFrame rather than creating a new one. kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort' Choice of sorting algorithm. See also :func:`numpy.sort` for more information. `mergesort` and `stable` are the only stable algorithms. For