@@ -104,7 +104,7 @@ for this PDEP, we can distinguish two kinds of "inplace" operations:
104
104
Object-inplace operations, while not actually modifying existing column values, keep
105
105
(a subset of) those columns and thus can avoid copying the data of those existing columns.
106
106
107
- In addition, several methods supporting the `` inplace `` keyword cannot actually be done inplace (in neither meaning)
107
+ In addition, several methods supporting the `` inplace `` keyword cannot actually be done inplace (in either meaning)
108
108
because they make a copy as a
109
109
consequence of the operations they perform, regardless of whether `` inplace `` is `` True `` or not. This, coupled with the
110
110
fact that the `` inplace=True `` changes the return type of a method from a pandas object to `` None `` , makes usage of
@@ -177,7 +177,7 @@ return a new object referencing the same data.
177
177
| ` eval ` |
178
178
| ` query ` |
179
179
180
- Although these methods have the ` inplace ` keyword, they can never operate inplace, in neither meaning, because the nature of the
180
+ Although these methods have the ` inplace ` keyword, they can never operate inplace, in either meaning, because the nature of the
181
181
operation requires copying (such as reordering or dropping rows). For those methods, ` inplace=True ` is essentially just
182
182
syntactic sugar for reassigning the new result to the calling DataFrame/Series.
183
183
@@ -214,7 +214,7 @@ All references to the original object will go out of scope when the result of th
214
214
to ` df ` . As a consequence, ` iloc ` will continue to operate inplace, and the underlying data will not be copied (with Copy-on-Write).
215
215
216
216
** Group 2 (values-inplace)** methods differ, though, since they modify the underlying
217
- data, and therefore can be actually happen inplace:
217
+ data, and therefore can actually happen inplace:
218
218
219
219
:::python
220
220
df = pd.DataFrame({"foo": [1, 2, 3]})
@@ -382,7 +382,7 @@ However, the `copy` keyword is not supported in any of the values-mutating metho
382
382
unlike ` inplace ` , so semantics of future inplace mutation of values align better with the current behavior of
383
383
the ` inplace ` keyword, than with the current behavior of the ` copy ` keyword.
384
384
385
- Furthermore, with the Copy-on-Write proposal, the ` copy ` keyword also has become superfluous. With Copy-on-Write
385
+ Furthermore, with the approved Copy-on-Write proposal, the ` copy ` keyword also has become superfluous. With Copy-on-Write
386
386
enabled, methods that return a new pandas object will always try to avoid a copy whenever possible, regardless of
387
387
a ` copy=False ` keyword. Thus, the Copy-on-Write PDEP proposes to actually remove the ` copy ` keyword from the methods
388
388
where it is currently used (so it would be strange to add this as a new keyword to the Group 2 methods).
0 commit comments