Skip to content

Commit 42ca8cd

Browse files
committed
DOC: minor whatsnew corrections
1 parent 0ff3a5d commit 42ca8cd

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

doc/source/whatsnew/v0.17.0.txt

+30-28
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ Support strftime for Datetimelikes
8585

8686
We are now supporting a ``Series.dt.strftime`` method for datetime-likes to generate a formatted string (:issue:`10110`). Examples:
8787

88-
.. ipython:: python
88+
.. ipython:: python
8989

90-
# DatetimeIndex
91-
s = pd.Series(pd.date_range('20130101', periods=4))
92-
s
93-
s.dt.strftime('%Y/%m/%d')
90+
# DatetimeIndex
91+
s = pd.Series(pd.date_range('20130101', periods=4))
92+
s
93+
s.dt.strftime('%Y/%m/%d')
9494

95-
.. ipython:: python
95+
.. ipython:: python
9696

97-
# PeriodIndex
98-
s = pd.Series(pd.period_range('20130101', periods=4))
99-
s
100-
s.dt.strftime('%Y/%m/%d')
97+
# PeriodIndex
98+
s = pd.Series(pd.period_range('20130101', periods=4))
99+
s
100+
s.dt.strftime('%Y/%m/%d')
101101

102102
The string format is as the python standard library and details can be found `here <https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior>`_
103103

@@ -186,19 +186,18 @@ Other enhancements
186186

187187
- ``read_sql_table`` will now allow reading from views (:issue:`10750`).
188188

189-
- ``drop_duplicates`` and ``duplicated`` now accept ``keep`` keyword to target first, last, and all duplicates. ``take_last`` keyword is deprecated, see :ref:`deprecations <whatsnew_0170.deprecations>` (:issue:`6511`, :issue:`8505`)
190-
191189
- ``msgpack`` submodule has been updated to 0.4.6 with backward compatibility (:issue:`10581`)
192190

193191
- ``DataFrame.to_dict`` now accepts the *index* option in ``orient`` keyword argument (:issue:`10844`).
194192

195-
.. ipython :: python
193+
- ``drop_duplicates`` and ``duplicated`` now accept ``keep`` keyword to target first, last, and all duplicates. ``take_last`` keyword is deprecated, see :ref:`deprecations <whatsnew_0170.deprecations>` (:issue:`6511`, :issue:`8505`)
196194

197-
s = pd.Series(['A', 'B', 'C', 'A', 'B', 'D'])
198-
s.drop_duplicates()
199-
s.drop_duplicates(keep='last')
200-
s.drop_duplicates(keep=False)
195+
.. ipython :: python
201196

197+
s = pd.Series(['A', 'B', 'C', 'A', 'B', 'D'])
198+
s.drop_duplicates()
199+
s.drop_duplicates(keep='last')
200+
s.drop_duplicates(keep=False)
202201

203202
- Reindex now has a ``tolerance`` argument that allows for finer control of :ref:`basics.limits_on_reindex_fill`:
204203

@@ -331,13 +330,13 @@ Changes to convert_objects
331330

332331
``DataFrame.convert_objects`` keyword arguments have been shortened. (:issue:`10265`)
333332

334-
===================== =============
335-
Old New
336-
===================== =============
337-
``convert_dates`` ``datetime``
338-
``convert_numeric`` ``numeric``
339-
``convert_timedelta`` ``timedelta``
340-
===================== =============
333+
===================== =============
334+
Old New
335+
===================== =============
336+
``convert_dates`` ``datetime``
337+
``convert_numeric`` ``numeric``
338+
``convert_timedelta`` ``timedelta``
339+
===================== =============
341340

342341
Coercing types with ``DataFrame.convert_objects`` is now implemented using the
343342
keyword argument ``coerce=True``. Previously types were coerced by setting a
@@ -598,19 +597,22 @@ Other API Changes
598597
- Enable serialization of lists and dicts to strings in ExcelWriter (:issue:`8188`)
599598
- Allow passing `kwargs` to the interpolation methods (:issue:`10378`).
600599
- Serialize metadata properties of subclasses of pandas objects (:issue:`10553`).
601-
- Allow ``DataFrame`` with ``MultiIndex`` columns to be written to Excel (:issue: `10564`). This was changed in 0.16.2 as the read-back method could not always guarantee perfect fidelity (:issue:`9794`).
600+
- Allow ``DataFrame`` with ``MultiIndex`` columns to be written to Excel (:issue:`10564`). This was changed in 0.16.2 as the read-back method could not always guarantee perfect fidelity (:issue:`9794`).
602601
- ``Categorical.unique`` now returns new ``Categorical`` which ``categories`` and ``codes`` are unique, rather than returning ``np.array`` (:issue:`10508`)
603602

604603
- unordered category: values and categories are sorted by appearance order.
605604
- ordered category: values are sorted by appearance order, categories keeps existing order.
606605

607606
.. ipython :: python
608607

609-
cat = pd.Categorical(['C', 'A', 'B', 'C'], categories=['A', 'B', 'C'], ordered=True)
608+
cat = pd.Categorical(['C', 'A', 'B', 'C'],
609+
categories=['A', 'B', 'C'],
610+
ordered=True)
610611
cat
611612
cat.unique()
612613

613-
cat = pd.Categorical(['C', 'A', 'B', 'C'], categories=['A', 'B', 'C'])
614+
cat = pd.Categorical(['C', 'A', 'B', 'C'],
615+
categories=['A', 'B', 'C'])
614616
cat
615617
cat.unique()
616618

@@ -775,7 +777,7 @@ Bug Fixes
775777
- Bug in ``read_csv`` when using the ``nrows`` or ``chunksize`` parameters if file contains only a header line (:issue:`9535`)
776778

777779
- Bug in ``pd.DataFrame`` when constructing an empty DataFrame with a string dtype (:issue:`9428`)
778-
- Bug in ``pd.unique`` for arrays with the ``datetime64`` or ``timedelta64`` dtype that meant an array with object dtype was returned instead the original dtype (:issue: `9431`)
780+
- Bug in ``pd.unique`` for arrays with the ``datetime64`` or ``timedelta64`` dtype that meant an array with object dtype was returned instead the original dtype (:issue:`9431`)
779781
- Bug in ``DatetimeIndex.take`` and ``TimedeltaIndex.take`` may not raise ``IndexError`` against invalid index (:issue:`10295`)
780782
- Bug in ``Series([np.nan]).astype('M8[ms]')``, which now returns ``Series([pd.NaT])`` (:issue:`10747`)
781783
- Bug in ``PeriodIndex.order`` reset freq (:issue:`10295`)

0 commit comments

Comments
 (0)