Skip to content

Commit

Permalink
DOC/CLN: remove outdated warnings in enhancingperf.rst (pandas-dev#33831
Browse files Browse the repository at this point in the history
)
  • Loading branch information
simonjayhawkins authored and rhshadrach committed May 10, 2020
1 parent 16051f5 commit d297039
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions doc/source/user_guide/enhancingperf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ Consider the following toy example of doubling each observation:
1000 loops, best of 3: 233 us per loop
# Custom function with numba
In [7]: %timeit (df['col1_doubled'] = double_every_value_withnumba(df['a'].to_numpy())
In [7]: %timeit df['col1_doubled'] = double_every_value_withnumba(df['a'].to_numpy())
1000 loops, best of 3: 145 us per loop
Caveats
Expand Down Expand Up @@ -599,13 +599,6 @@ identifier.
The ``inplace`` keyword determines whether this assignment will performed
on the original ``DataFrame`` or return a copy with the new column.

.. warning::

For backwards compatibility, ``inplace`` defaults to ``True`` if not
specified. This will change in a future version of pandas - if your
code depends on an inplace assignment you should update to explicitly
set ``inplace=True``.

.. ipython:: python
df = pd.DataFrame(dict(a=range(5), b=range(5, 10)))
Expand All @@ -614,7 +607,7 @@ on the original ``DataFrame`` or return a copy with the new column.
df.eval('a = 1', inplace=True)
df
When ``inplace`` is set to ``False``, a copy of the ``DataFrame`` with the
When ``inplace`` is set to ``False``, the default, a copy of the ``DataFrame`` with the
new or modified columns is returned and the original frame is unchanged.

.. ipython:: python
Expand Down Expand Up @@ -653,11 +646,6 @@ whether the query modifies the original frame.
df.query('a > 2', inplace=True)
df
.. warning::

Unlike with ``eval``, the default value for ``inplace`` for ``query``
is ``False``. This is consistent with prior versions of pandas.

Local variables
~~~~~~~~~~~~~~~

Expand Down

0 comments on commit d297039

Please sign in to comment.