Skip to content

Commit 586c77e

Browse files
committed
shut down warnings in the whats new files
1 parent aca7a08 commit 586c77e

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

doc/source/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ Reshaping, sorting
437437
Series.reorder_levels
438438
Series.sort_values
439439
Series.sort_index
440+
Series.sortlevel
440441
Series.swaplevel
441442
Series.unstack
442443
Series.searchsorted

doc/source/categorical.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ meaning and certain operations are possible. If the categorical is unordered, ``
280280
.. ipython:: python
281281
282282
s = pd.Series(pd.Categorical(["a","b","c","a"], ordered=False))
283-
s.sort()
283+
s.sort_values(inplace=True)
284284
s = pd.Series(["a","b","c","a"]).astype('category', ordered=True)
285-
s.sort()
285+
s.sort_values(inplace=True)
286286
s
287287
s.min(), s.max()
288288
@@ -302,7 +302,7 @@ This is even true for strings and numeric data:
302302
s = pd.Series([1,2,3,1], dtype="category")
303303
s = s.cat.set_categories([2,3,1], ordered=True)
304304
s
305-
s.sort()
305+
s.sort_values(inplace=True)
306306
s
307307
s.min(), s.max()
308308
@@ -320,7 +320,7 @@ necessarily make the sort order the same as the categories order.
320320
s = pd.Series([1,2,3,1], dtype="category")
321321
s = s.cat.reorder_categories([2,3,1], ordered=True)
322322
s
323-
s.sort()
323+
s.sort_values(inplace=True)
324324
s
325325
s.min(), s.max()
326326
@@ -349,14 +349,14 @@ The ordering of the categorical is determined by the ``categories`` of that colu
349349
350350
dfs = pd.DataFrame({'A' : pd.Categorical(list('bbeebbaa'), categories=['e','a','b'], ordered=True),
351351
'B' : [1,2,1,2,2,1,2,1] })
352-
dfs.sort(['A', 'B'])
352+
dfs.sort_values(by=['A', 'B'])
353353
354354
Reordering the ``categories`` changes a future sort.
355355

356356
.. ipython:: python
357357
358358
dfs['A'] = dfs['A'].cat.reorder_categories(['a','b','e'])
359-
dfs.sort(['A','B'])
359+
dfs.sort_values(by=['A','B'])
360360
361361
Comparisons
362362
-----------

doc/source/whatsnew/v0.13.1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ API changes
120120
equal. (:issue:`5283`) See also :ref:`the docs<basics.equals>` for a motivating example.
121121

122122
.. ipython:: python
123-
123+
:okwarning:
124+
124125
df = DataFrame({'col':['foo', 0, np.nan]})
125126
df2 = DataFrame({'col':[np.nan, 0, 'foo']}, index=[2,1,0])
126127
df.equals(df2)

doc/source/whatsnew/v0.15.0.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ For full docs, see the :ref:`categorical introduction <categorical>` and the
6767
:ref:`API documentation <api.categorical>`.
6868

6969
.. ipython:: python
70-
70+
:okwarning:
71+
7172
df = DataFrame({"id":[1,2,3,4,5,6], "raw_grade":['a', 'b', 'b', 'a', 'a', 'e']})
7273

7374
df["grade"] = df["raw_grade"].astype("category")

doc/source/whatsnew/v0.7.3.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ When calling ``apply`` on a grouped Series, the return value will also be a
8383
Series, to be more consistent with the ``groupby`` behavior with DataFrame:
8484

8585
.. ipython:: python
86+
:okwarning:
8687

8788
df = DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
8889
'foo', 'bar', 'foo', 'foo'],
@@ -93,4 +94,3 @@ Series, to be more consistent with the ``groupby`` behavior with DataFrame:
9394
grouped = df.groupby('A')['C']
9495
grouped.describe()
9596
grouped.apply(lambda x: x.order()[-2:]) # top 2 values
96-

doc/source/whatsnew/v0.9.1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ New features
2121
specified in a per-column manner to support multiple sort orders (:issue:`928`)
2222

2323
.. ipython:: python
24+
:okwarning:
2425

2526
df = DataFrame(np.random.randint(0, 2, (6, 3)), columns=['A', 'B', 'C'])
2627

@@ -66,7 +67,7 @@ New features
6667
.. ipython:: python
6768

6869
df[df>0]
69-
70+
7071
df.where(df>0)
7172

7273
df.where(df>0,-df)

0 commit comments

Comments
 (0)