Skip to content

Commit 948993e

Browse files
committed
changed according to comments
1 parent c487676 commit 948993e

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

doc/source/user_guide/text.rst

+9
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,15 @@ Extracting substrings
364364
Extract first match in each subject (extract)
365365
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366366

367+
.. warning::
368+
369+
Before version 0.23, argument ``expand`` of the ``extract`` method defaulted to
370+
``False``. When ``expand=False``, ``expand`` returns a ``Series``, ``Index``, or
371+
``DataFrame``, depending on the subject and regular expression
372+
pattern. When ``expand=True``, it always returns a ``DataFrame``,
373+
which is more consistent and less confusing from the perspective of a user.
374+
``expand=True`` has been the default since version 0.23.0.
375+
367376
The ``extract`` method accepts a `regular expression
368377
<https://docs.python.org/3/library/re.html>`__ with at least one
369378
capture group.

doc/source/whatsnew/v0.16.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ Deprecations
530530
`seaborn <http://stanford.edu/~mwaskom/software/seaborn/>`_ for similar
531531
but more refined functionality (:issue:`3445`).
532532
The documentation includes some examples how to convert your existing code
533-
using ``rplot`` to seaborn: :ref:`rplot docs <rplot>`.
533+
from ``rplot`` to seaborn `here <http://pandas.pydata.org/pandas-docs/version/0.18.1/visualization.html#trellis-plotting-interface>`__.
534534

535535
- The ``pandas.sandbox.qtpandas`` interface is deprecated and will be removed in a future version.
536536
We refer users to the external package `pandas-qt <https://github.com/datalyze-solutions/pandas-qt>`_. (:issue:`9615`)

pandas/core/series.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3593,12 +3593,16 @@ def nsmallest(self, n=5, keep="first"):
35933593

35943594
def swaplevel(self, i=-2, j=-1, copy=True):
35953595
"""
3596-
Swap levels i and j in a MultiIndex.
3596+
Swap levels i and j in a :class:`MultiIndex`.
3597+
3598+
Default is to swap the two innermost levels of the index.
35973599
35983600
Parameters
35993601
----------
36003602
i, j : int, str (can be mixed)
36013603
Level of index to be swapped. Can pass level name as string.
3604+
copy : bool, default True
3605+
Whether to copy underlying data.
36023606
36033607
Returns
36043608
-------

0 commit comments

Comments
 (0)