From 9f803724ebd87fa59e856174524f7688eeea57c5 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sun, 26 Mar 2017 10:54:09 -0400 Subject: [PATCH] DOC: remove warnings for .sort / .order deprecation removals --- doc/source/whatsnew/v0.13.1.txt | 2 +- doc/source/whatsnew/v0.15.0.txt | 2 +- doc/source/whatsnew/v0.20.0.txt | 5 +++++ doc/source/whatsnew/v0.7.3.txt | 2 +- doc/source/whatsnew/v0.9.1.txt | 15 +++++++++++---- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/source/whatsnew/v0.13.1.txt b/doc/source/whatsnew/v0.13.1.txt index d5d54ba43b622..5e5653945fefa 100644 --- a/doc/source/whatsnew/v0.13.1.txt +++ b/doc/source/whatsnew/v0.13.1.txt @@ -125,7 +125,7 @@ API changes df = DataFrame({'col':['foo', 0, np.nan]}) df2 = DataFrame({'col':[np.nan, 0, 'foo']}, index=[2,1,0]) df.equals(df2) - df.equals(df2.sort()) + df.equals(df2.sort_index()) import pandas.core.common as com com.array_equivalent(np.array([0, np.nan]), np.array([0, np.nan])) diff --git a/doc/source/whatsnew/v0.15.0.txt b/doc/source/whatsnew/v0.15.0.txt index aff8ec9092cdc..6282f15b6faeb 100644 --- a/doc/source/whatsnew/v0.15.0.txt +++ b/doc/source/whatsnew/v0.15.0.txt @@ -80,7 +80,7 @@ For full docs, see the :ref:`categorical introduction ` and the # Reorder the categories and simultaneously add the missing categories df["grade"] = df["grade"].cat.set_categories(["very bad", "bad", "medium", "good", "very good"]) df["grade"] - df.sort("grade") + df.sort_values("grade") df.groupby("grade").size() - ``pandas.core.group_agg`` and ``pandas.core.factor_agg`` were removed. As an alternative, construct diff --git a/doc/source/whatsnew/v0.20.0.txt b/doc/source/whatsnew/v0.20.0.txt index f96fc41c73f15..38109d5442751 100644 --- a/doc/source/whatsnew/v0.20.0.txt +++ b/doc/source/whatsnew/v0.20.0.txt @@ -35,6 +35,11 @@ New features The ``dtype`` keyword argument in the :func:`read_csv` function for specifying the types of parsed columns is now supported with the ``'python'`` engine (:issue:`14295`). See the :ref:`io docs ` for more information. +.. ipython:: python + :suppress: + + from pandas.compat import StringIO + .. ipython:: python data = "a,b\n1,2\n3,4" diff --git a/doc/source/whatsnew/v0.7.3.txt b/doc/source/whatsnew/v0.7.3.txt index 21aa16e5fcb06..6b5199c55cbf5 100644 --- a/doc/source/whatsnew/v0.7.3.txt +++ b/doc/source/whatsnew/v0.7.3.txt @@ -93,4 +93,4 @@ Series, to be more consistent with the ``groupby`` behavior with DataFrame: df grouped = df.groupby('A')['C'] grouped.describe() - grouped.apply(lambda x: x.order()[-2:]) # top 2 values + grouped.apply(lambda x: x.sort_values()[-2:]) # top 2 values diff --git a/doc/source/whatsnew/v0.9.1.txt b/doc/source/whatsnew/v0.9.1.txt index 9dd29a5fe7bf7..4faf38219ebee 100644 --- a/doc/source/whatsnew/v0.9.1.txt +++ b/doc/source/whatsnew/v0.9.1.txt @@ -20,13 +20,20 @@ New features - `Series.sort`, `DataFrame.sort`, and `DataFrame.sort_index` can now be specified in a per-column manner to support multiple sort orders (:issue:`928`) - .. ipython:: python - :okwarning: + .. code-block:: ipython - df = DataFrame(np.random.randint(0, 2, (6, 3)), columns=['A', 'B', 'C']) + In [2]: df = DataFrame(np.random.randint(0, 2, (6, 3)), columns=['A', 'B', 'C']) - df.sort(['A', 'B'], ascending=[1, 0]) + In [3]: df.sort(['A', 'B'], ascending=[1, 0]) + Out[3]: + A B C + 3 0 1 1 + 4 0 1 1 + 2 0 0 1 + 0 1 0 0 + 1 1 0 0 + 5 1 0 0 - `DataFrame.rank` now supports additional argument values for the `na_option` parameter so missing values can be assigned either the largest