Skip to content

Commit 647271e

Browse files
authored
sync "inplace" document strings anywhere possible (#47122)
* Fixing documentation format in read_csv add a mising ` in on_bad_lines option description in " New in version 1.3.0: " section , that was causing to make couple of lines red * sync 'inplace' doc everyhwere possible
1 parent 8e522eb commit 647271e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

pandas/core/frame.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
If 1 or 'columns': apply function to each row.""",
241241
"inplace": """
242242
inplace : bool, default False
243-
If True, performs operation inplace and returns None.""",
243+
Whether to modify the DataFrame rather than creating a new one.""",
244244
"optional_by": """
245245
by : str or list of str
246246
Name or list of names to sort by.
@@ -4071,8 +4071,7 @@ def query(self, expr: str, inplace: bool = False, **kwargs):
40714071
Expanding functionality of backtick quoting for more than only spaces.
40724072
40734073
inplace : bool
4074-
Whether the query should modify the data in place or return
4075-
a modified copy.
4074+
Whether to modify the DataFrame rather than creating a new one.
40764075
**kwargs
40774076
See the documentation for :func:`eval` for complete details
40784077
on the keyword arguments accepted by :meth:`DataFrame.query`.
@@ -5175,8 +5174,8 @@ def rename(
51755174
copy : bool, default True
51765175
Also copy underlying data.
51775176
inplace : bool, default False
5178-
Whether to return a new DataFrame. If True then value of copy is
5179-
ignored.
5177+
Whether to modify the DataFrame rather than creating a new one.
5178+
If True then value of copy is ignored.
51805179
level : int or level name, default None
51815180
In case of a MultiIndex, only rename labels in the specified
51825181
level.
@@ -5607,7 +5606,7 @@ def set_index(
56075606
append : bool, default False
56085607
Whether to append columns to existing index.
56095608
inplace : bool, default False
5610-
If True, modifies the DataFrame in place (do not create a new object).
5609+
Whether to modify the DataFrame rather than creating a new one.
56115610
verify_integrity : bool, default False
56125611
Check the new index for duplicates. Otherwise defer the check until
56135612
necessary. Setting to False will improve the performance of this
@@ -5884,7 +5883,7 @@ def reset_index(
58845883
Do not try to insert index into dataframe columns. This resets
58855884
the index to the default integer index.
58865885
inplace : bool, default False
5887-
Modify the DataFrame in place (do not create a new object).
5886+
Whether to modify the DataFrame rather than creating a new one.
58885887
col_level : int or str, default 0
58895888
If the columns have multiple levels, determines which level the
58905889
labels are inserted into. By default it is inserted into the first
@@ -6171,7 +6170,7 @@ def dropna(
61716170
Labels along other axis to consider, e.g. if you are dropping rows
61726171
these would be a list of columns to include.
61736172
inplace : bool, default False
6174-
If True, do operation inplace and return None.
6173+
Whether to modify the DataFrame rather than creating a new one.
61756174
61766175
Returns
61776176
-------
@@ -6316,7 +6315,7 @@ def drop_duplicates(
63166315
- ``last`` : Drop duplicates except for the last occurrence.
63176316
- False : Drop all duplicates.
63186317
inplace : bool, default False
6319-
Whether to drop duplicates in place or to return a copy.
6318+
Whether to modify the DataFrame rather than creating a new one.
63206319
ignore_index : bool, default False
63216320
If True, the resulting axis will be labeled 0, 1, …, n - 1.
63226321
@@ -6690,7 +6689,7 @@ def sort_index( # type: ignore[override]
66906689
Sort ascending vs. descending. When the index is a MultiIndex the
66916690
sort direction can be controlled for each level individually.
66926691
inplace : bool, default False
6693-
If True, perform operation in-place.
6692+
Whether to modify the DataFrame rather than creating a new one.
66946693
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
66956694
Choice of sorting algorithm. See also :func:`numpy.sort` for more
66966695
information. `mergesort` and `stable` are the only stable algorithms. For

0 commit comments

Comments
 (0)