@@ -396,7 +396,7 @@ Consider the following toy example of doubling each observation:
396
396
1000 loops, best of 3: 233 us per loop
397
397
398
398
# Custom function with numba
399
- In [7]: %timeit ( df['col1_doubled'] = double_every_value_withnumba(df['a'].to_numpy())
399
+ In [7]: %timeit df['col1_doubled'] = double_every_value_withnumba(df['a'].to_numpy())
400
400
1000 loops, best of 3: 145 us per loop
401
401
402
402
Caveats
@@ -599,13 +599,6 @@ identifier.
599
599
The ``inplace `` keyword determines whether this assignment will performed
600
600
on the original ``DataFrame `` or return a copy with the new column.
601
601
602
- .. warning ::
603
-
604
- For backwards compatibility, ``inplace `` defaults to ``True `` if not
605
- specified. This will change in a future version of pandas - if your
606
- code depends on an inplace assignment you should update to explicitly
607
- set ``inplace=True ``.
608
-
609
602
.. ipython :: python
610
603
611
604
df = pd.DataFrame(dict (a = range (5 ), b = range (5 , 10 )))
@@ -614,7 +607,7 @@ on the original ``DataFrame`` or return a copy with the new column.
614
607
df.eval(' a = 1' , inplace = True )
615
608
df
616
609
617
- When ``inplace `` is set to ``False ``, a copy of the ``DataFrame `` with the
610
+ When ``inplace `` is set to ``False ``, the default, a copy of the ``DataFrame `` with the
618
611
new or modified columns is returned and the original frame is unchanged.
619
612
620
613
.. ipython :: python
@@ -653,11 +646,6 @@ whether the query modifies the original frame.
653
646
df.query(' a > 2' , inplace = True )
654
647
df
655
648
656
- .. warning ::
657
-
658
- Unlike with ``eval ``, the default value for ``inplace `` for ``query ``
659
- is ``False ``. This is consistent with prior versions of pandas.
660
-
661
649
Local variables
662
650
~~~~~~~~~~~~~~~
663
651
0 commit comments