Skip to content

Commit 13f659f

Browse files
committed
DOC: whatsnew fixes
1 parent 60cacab commit 13f659f

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

doc/source/whatsnew/v0.18.0.txt

+21-13
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Other enhancements
107107
- ``read_excel`` now supports s3 urls of the format ``s3://bucketname/filename`` (:issue:`11447`)
108108
- A simple version of ``Panel.round()`` is now implemented (:issue:`11763`)
109109
- For Python 3.x, ``round(DataFrame)``, ``round(Series)``, ``round(Panel)`` will work (:issue:`11763`)
110-
- ``DataFrame`` has gained a ``_repr_latex_`` method in order to allow for automatic conversion to latex in a ipython/jupyter notebook using nbconvert. Options ``display.latex.escape`` and ``display.latex.longtable`` have been added to the configuration and are used automatically by the ``to_latex`` method.(:issue:`11778`)
110+
- ``DataFrame`` has gained a ``_repr_latex_`` method in order to allow for automatic conversion to latex in a ipython/jupyter notebook using nbconvert. Options ``display.latex.escape`` and ``display.latex.longtable`` have been added to the configuration and are used automatically by the ``to_latex`` method. (:issue:`11778`)
111111
- ``sys.getsizeof(obj)`` returns the memory usage of a pandas object, including the
112112
values it contains (:issue:`11597`)
113113

@@ -163,12 +163,11 @@ In addition, ``.round()`` will be available thru the ``.dt`` accessor of ``Serie
163163

164164
.. _whatsnew_0180.api_breaking:
165165

166-
- the leading whitespaces have been removed from the output of ``.to_string(index=False)`` method (:issue:`11833`)
167-
168166
Backwards incompatible API changes
169167
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170168

171-
- The parameter ``out`` has been removed from the ``Series.round()`` method. (:issue:`11763`)
169+
- the leading whitespaces have been removed from the output of ``.to_string(index=False)`` method (:issue:`11833`)
170+
- the ``out`` parameter has been removed from the ``Series.round()`` method. (:issue:`11763`)
172171
- ``DataFrame.round()`` leaves non-numeric columns unchanged in its return, rather than raises. (:issue:`11885`)
173172
- ``DataFrame.head(0)`` and ``DataFrame.tail(0)`` return empty frames, rather than ``self``. (:issue:`11937`)
174173
- ``Series.head(0)`` and ``Series.tail(0)`` return empty series, rather than ``self``. (:issue:`11937`)
@@ -197,27 +196,36 @@ are now also defined for ``NaT`` (:issue:`11564`).
197196
pd.Timedelta('1s') / pd.NaT
198197

199198
``NaT`` may represent either a ``datetime64[ns]`` null or a ``timedelta64[ns]`` null.
200-
Given the ambiguity, it is treated as a `timedelta64[ns]`, which allows more operations
199+
Given the ambiguity, it is treated as a ``timedelta64[ns]``, which allows more operations
201200
to succeed.
202201

203202
.. ipython:: python
204-
:okexcept:
205203

206204
pd.NaT + pd.NaT
205+
207206
# same as
208207
pd.Timedelta('1s') + pd.Timedelta('1s')
209-
# as opposed to
210-
pd.Timestamp('1990315') + pd.Timestamp('19900315')
208+
209+
as opposed to
210+
211+
.. code-block:: python
212+
213+
In [3]: pd.Timestamp('1990315') + pd.Timestamp('19900315')
214+
ValueError:
211215

212216
However, when wrapped in a ``Series`` whose ``dtype`` is ``datetime64[ns]`` or ``timedelta64[ns]``,
213217
the ``dtype`` information is respected.
214218

219+
.. code-block:: python
220+
221+
In [1]: pd.Series([pd.NaT], dtype='<M8[ns]') + pd.Series([pd.NaT], dtype='<M8[ns]')
222+
TypeError: can only operate on a datetimes for subtraction, but the operator [__add__] was passed
223+
215224
.. ipython:: python
216225

217-
pd.Series([pd.NaT], dtype='<M8[ns]') + pd.Series([pd.NaT], dtype='<M8[ns]')
218226
pd.Series([pd.NaT], dtype='<m8[ns]') + pd.Series([pd.NaT], dtype='<m8[ns]')
219227

220-
``Timedelta`` division by ``float``s now works.
228+
``Timedelta`` division by ``floats`` now works.
221229

222230
.. ipython:: python
223231

@@ -270,8 +278,8 @@ other anchored offsets like ``MonthBegin`` and ``YearBegin``.
270278
Other API Changes
271279
^^^^^^^^^^^^^^^^^
272280

273-
- ``DataFrame.between_time`` and ``Series.between_time`` now only parse a fixed set of time strings. Parsing
274-
of date strings is no longer supported and raises a ``ValueError``. (:issue:`11818`)
281+
- ``DataFrame.between_time`` and ``Series.between_time`` now only parse a fixed set of time strings. Parsing of
282+
date strings is no longer supported and raises a ``ValueError``. (:issue:`11818`)
275283

276284
.. ipython:: python
277285

@@ -379,7 +387,7 @@ Bug Fixes
379387

380388

381389

382-
- Bug in vectorized ``DateOffset`` when ``n`` parameter is ``0`` (:issue:`11370`)
390+
- Bug in vectorized ``DateOffset`` when ``n`` parameter is ``0`` (:issue:`11370`)
383391

384392

385393

0 commit comments

Comments
 (0)