Skip to content

Commit c9bf162

Browse files
Merge pull request #10076 from sinhrks/rn20150507
DOC: Fix v0.16.1 release note
2 parents 9c99566 + 2ff07f1 commit c9bf162

File tree

2 files changed

+43
-27
lines changed

2 files changed

+43
-27
lines changed

doc/source/internals.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ not check (or care) whether the levels themselves are sorted. Fortunately, the
9494
constructors ``from_tuples`` and ``from_arrays`` ensure that this is true, but
9595
if you compute the levels and labels yourself, please be careful.
9696

97-
98-
.. _:
97+
.. _ref-subclassing-pandas:
9998

10099
Subclassing pandas Data Structures
101100
----------------------------------

doc/source/whatsnew/v0.16.1.txt

+42-25
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Highlights include:
1616

1717
- ``BusinessHour`` offset is supported, see :ref:`here <timeseries.businesshour>`
1818

19+
- Further enhancement to the ``.str`` accessor to make string operations easier, see :ref:`here <whatsnew_0161.enhancements.string>`
20+
1921
.. contents:: What's new in v0.16.1
2022
:local:
2123
:backlinks: none
@@ -37,34 +39,9 @@ Enhancements
3739
Timestamp('2014-08-01 07:00') + BusinessHour()
3840
Timestamp('2014-08-01 16:30') + BusinessHour()
3941

40-
- Added ``StringMethods.capitalize()`` and ``swapcase`` which behave as the same as standard ``str`` (:issue:`9766`)
4142
- ``DataFrame.diff`` now takes an ``axis`` parameter that determines the direction of differencing (:issue:`9727`)
42-
- Added ``StringMethods`` (.str accessor) to ``Index`` (:issue:`9068`)
43-
- Added ``StringMethods.normalize()`` which behaves the same as standard :func:`unicodedata.normalizes` (:issue:`10031`)
44-
45-
- Added ``StringMethods.partition()`` and ``rpartition()`` which behave as the same as standard ``str`` (:issue:`9773`)
4643
- Allow clip, clip_lower, and clip_upper to accept array-like arguments as thresholds (:issue:`6966`). These methods now have an ``axis`` parameter which determines how the Series or DataFrame will be aligned with the threshold(s).
4744

48-
The ``.str`` accessor is now available for both ``Series`` and ``Index``.
49-
50-
.. ipython:: python
51-
52-
idx = Index([' jack', 'jill ', ' jesse ', 'frank'])
53-
idx.str.strip()
54-
55-
One special case for the `.str` accessor on ``Index`` is that if a string method returns ``bool``, the ``.str`` accessor
56-
will return a ``np.array`` instead of a boolean ``Index`` (:issue:`8875`). This enables the following expression
57-
to work naturally:
58-
59-
60-
.. ipython:: python
61-
62-
idx = Index(['a1', 'a2', 'b1', 'b2'])
63-
s = Series(range(4), index=idx)
64-
s
65-
idx.str.startswith('a')
66-
s[s.index.str.startswith('a')]
67-
6845
- ``DataFrame.mask()`` and ``Series.mask()`` now support same keywords as ``where`` (:issue:`8801`)
6946

7047
- ``drop`` function can now accept ``errors`` keyword to suppress ``ValueError`` raised when any of label does not exist in the target data. (:issue:`6736`)
@@ -199,6 +176,46 @@ when sampling from rows.
199176
df = DataFrame({'col1':[9,8,7,6], 'weight_column':[0.5, 0.4, 0.1, 0]})
200177
df.sample(n=3, weights='weight_column')
201178

179+
180+
.. _whatsnew_0161.enhancements.string:
181+
182+
String Methods Enhancements
183+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
184+
185+
:ref:`Continuing from v0.16.0 <whatsnew_0160.enhancements.string>`, following
186+
enhancements are performed to make string operation easier.
187+
188+
- Following new methods are accesible via ``.str`` accessor to apply the function to each values. This is intended to make it more consistent with standard methods on strings. (:issue:`9766`, :issue:`9773`, :issue:`10031`)
189+
190+
================ =============== =============== =============== ================
191+
.. .. Methods .. ..
192+
================ =============== =============== =============== ================
193+
``capitalize()`` ``swapcase()`` ``normalize()`` ``partition()`` ``rpartition()``
194+
================ =============== =============== =============== ================
195+
196+
197+
198+
- Added ``StringMethods`` (.str accessor) to ``Index`` (:issue:`9068`)
199+
200+
The ``.str`` accessor is now available for both ``Series`` and ``Index``.
201+
202+
.. ipython:: python
203+
204+
idx = Index([' jack', 'jill ', ' jesse ', 'frank'])
205+
idx.str.strip()
206+
207+
One special case for the `.str` accessor on ``Index`` is that if a string method returns ``bool``, the ``.str`` accessor
208+
will return a ``np.array`` instead of a boolean ``Index`` (:issue:`8875`). This enables the following expression
209+
to work naturally:
210+
211+
.. ipython:: python
212+
213+
idx = Index(['a1', 'a2', 'b1', 'b2'])
214+
s = Series(range(4), index=idx)
215+
s
216+
idx.str.startswith('a')
217+
s[s.index.str.startswith('a')]
218+
202219
.. _whatsnew_0161.api:
203220

204221
API changes

0 commit comments

Comments
 (0)