Skip to content

Commit add715c

Browse files
committed
DOC: v0.15.0 edits
1 parent 0532ba3 commit add715c

File tree

2 files changed

+26
-47
lines changed

2 files changed

+26
-47
lines changed

doc/source/timedeltas.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ to_timedelta
7777

7878
.. warning::
7979

80-
Prior to 0.15.0 ``to_timedelta`` would return a ``Series`` for list-like/Series input, and a ``np.timedelta64`` for scalar input.
80+
Prior to 0.15.0 ``pd.to_timedelta`` would return a ``Series`` for list-like/Series input, and a ``np.timedelta64`` for scalar input.
8181
It will now return a ``TimedeltaIndex`` for list-like input, ``Series`` for Series input, and ``Timedelta`` for scalar input.
8282

83-
The arguments to ``pd.to_timedelta`` are now ``(arg,unit='ns',box=True)``, previously were ``(arg,unit='ns',box=True)`` as these are more logical.
83+
The arguments to ``pd.to_timedelta`` are now ``(arg,unit='ns',box=True)``, previously were ``(arg,box=True,unit='ns')`` as these are more logical.
8484

8585
Using the top-level ``pd.to_timedelta``, you can convert a scalar, array, list, or Series from a recognized timedelta format / value into a ``Timedelta`` type.
8686
It will construct Series if the input is a Series, a scalar if the input is scalar-like, otherwise will output a ``TimedeltaIndex``
@@ -284,7 +284,7 @@ similarly to the ``Series``
284284
285285
# datetime.timedelta accessor
286286
# this is 5 minutes * 60 + 3 seconds
287-
tds.to_timedelta().seconds
287+
tds.to_pytimedelta().seconds
288288
289289
290290
TimedeltaIndex

doc/source/v0.15.0.txt

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,20 @@ users upgrade to this version.
1717

1818
- The ``Categorical`` type was integrated as a first-class pandas type, see :ref:`here <whatsnew_0150.cat>`
1919
- New scalar type ``Timedelta``, and a new index type ``TimedeltaIndex``, see :ref:`here <whatsnew_0150.timedeltaindex>`
20-
- Internal refactoring of the ``Index`` class to no longer sub-class ``ndarray``, see :ref:`Internal Refactoring <whatsnew_0150.refactoring>`
2120
- New datetimelike properties accessor ``.dt`` for Series, see :ref:`Datetimelike Properties <whatsnew_0150.dt>`
22-
- dropping support for ``PyTables`` less than version 3.0.0, and ``numexpr`` less than version 2.1 (:issue:`7990`)
23-
- API change in using Indexes in set operations, see :ref:`here <whatsnew_0150.index_set_ops>`
2421
- Split indexing documentation into :ref:`Indexing and Selecing Data <indexing>` and :ref:`MultiIndex / Advanced Indexing <advanced>`
22+
- API change in using Indexes in set operations, see :ref:`here <whatsnew_0150.index_set_ops>`
23+
- Internal refactoring of the ``Index`` class to no longer sub-class ``ndarray``, see :ref:`Internal Refactoring <whatsnew_0150.refactoring>`
24+
- dropping support for ``PyTables`` less than version 3.0.0, and ``numexpr`` less than version 2.1 (:issue:`7990`)
2525

2626
- :ref:`Other Enhancements <whatsnew_0150.enhancements>`
2727

2828
- :ref:`API Changes <whatsnew_0150.api>`
2929

3030
- :ref:`Performance Improvements <whatsnew_0150.performance>`
3131

32-
- :ref:`Prior Deprecations <whatsnew_0150.prior_deprecations>`
33-
3432
- :ref:`Deprecations <whatsnew_0150.deprecations>`
3533

36-
- :ref:`Known Issues <whatsnew_0150.knownissues>`
37-
3834
- :ref:`Bug Fixes <whatsnew_0150.bug_fixes>`
3935

4036
.. warning::
@@ -350,21 +346,21 @@ API changes
350346

351347
- The Index set operations ``+`` and ``-`` were deprecated in order to provide these for numeric type operations on certain index types. ``+`` can be replace by ``.union()`` or ``|``, and ``-`` by ``.difference()``. Further the method name ``Index.diff()`` is deprecated and can be replaced by ``Index.difference()`` (:issue:`8226`)
352348

353-
.. code-block:: python
349+
.. code-block:: python
354350

355-
# +
356-
Index(['a','b','c']) + Index(['b','c','d'])
351+
# +
352+
Index(['a','b','c']) + Index(['b','c','d'])
357353

358-
# should be replaced by
359-
Index(['a','b','c']).union(Index(['b','c','d']))
354+
# should be replaced by
355+
Index(['a','b','c']).union(Index(['b','c','d']))
360356

361-
.. code-block:: python
357+
.. code-block:: python
362358

363-
# -
364-
Index(['a','b','c']) - Index(['b','c','d'])
359+
# -
360+
Index(['a','b','c']) - Index(['b','c','d'])
365361

366-
# should be replaced by
367-
Index(['a','b','c']).difference(Index(['b','c','d']))
362+
# should be replaced by
363+
Index(['a','b','c']).difference(Index(['b','c','d']))
368364

369365
- ``DataFrame.info()`` now ends its output with a newline character (:issue:`8114`)
370366

@@ -498,14 +494,14 @@ This type is very similar to how ``Timestamp`` works for ``datetimes``. It is a
498494

499495
# datetime.timedelta accessor
500496
# this is 5 minutes * 60 + 3 seconds
501-
tds.to_timedelta().seconds
497+
tds.to_pytimedelta().seconds
502498

503499
.. warning::
504500

505-
Prior to 0.15.0 ``to_timedelta`` would return a ``Series`` for list-like/Series input, and a ``np.timedelta64`` for scalar input.
501+
Prior to 0.15.0 ``pd.to_timedelta`` would return a ``Series`` for list-like/Series input, and a ``np.timedelta64`` for scalar input.
506502
It will now return a ``TimedeltaIndex`` for list-like input, ``Series`` for Series input, and ``Timedelta`` for scalar input.
507503

508-
The arguments to ``pd.to_timedelta`` are now ``(arg,unit='ns',box=True)``, previously were ``(arg,unit='ns',box=True)`` as these are more logical.
504+
The arguments to ``pd.to_timedelta`` are now ``(arg,unit='ns',box=True)``, previously were ``(arg,box=True,unit='ns')`` as these are more logical.
509505

510506
Consruct a scalar
511507

@@ -596,11 +592,6 @@ Deprecations
596592
Replace ``infer_dst=True`` with ``ambiguous='infer'`` for the same behavior (:issue:`7943`).
597593
See :ref:`the docs<timeseries.timezone_ambiguous>` for more details.
598594

599-
.. _whatsnew_0150.knownissues:
600-
601-
Known Issues
602-
~~~~~~~~~~~~
603-
604595
.. _whatsnew_0150.enhancements:
605596

606597
Enhancements
@@ -611,10 +602,10 @@ Enhancements
611602
- Added support for specifying a ``schema`` to read from/write to with ``read_sql_table`` and ``to_sql`` (:issue:`7441`, :issue:`7952`).
612603
For example:
613604

614-
.. code-block:: python
605+
.. code-block:: python
615606

616-
df.to_sql('table', engine, schema='other_schema')
617-
pd.read_sql_table('table', engine, schema='other_schema')
607+
df.to_sql('table', engine, schema='other_schema')
608+
pd.read_sql_table('table', engine, schema='other_schema')
618609

619610
- Added support for writing ``NaN`` values with ``to_sql`` (:issue:`2754`).
620611
- Added support for writing datetime64 columns with ``to_sql`` for all database flavors (:issue:`7103`).
@@ -719,13 +710,6 @@ Performance
719710

720711

721712

722-
.. _whatsnew_0150.experimental:
723-
724-
Experimental
725-
~~~~~~~~~~~~
726-
727-
There are no experimental changes in 0.15.0
728-
729713
.. _whatsnew_0150.bug_fixes:
730714

731715
Bug Fixes
@@ -919,12 +903,7 @@ Bug Fixes
919903

920904

921905

922-
- Bug in interpolation methods with the ``limit`` keyword when no values
923-
needed interpolating (:issue:`7173`).
924-
- Bug where ``col_space`` was ignored in ``DataFrame.to_string()`` when ``header=False``
925-
(:issue:`8230`).
926-
- Bug with ``DatetimeIndex.asof`` incorrectly matching partial strings and
927-
returning the wrong date (:issue:`8245`).
928-
- Bug in plotting methods modifying the global matplotlib
929-
rcParams (:issue:`8242`).
930-
906+
- Bug in interpolation methods with the ``limit`` keyword when no values needed interpolating (:issue:`7173`).
907+
- Bug where ``col_space`` was ignored in ``DataFrame.to_string()`` when ``header=False`` (:issue:`8230`).
908+
- Bug with ``DatetimeIndex.asof`` incorrectly matching partial strings and returning the wrong date (:issue:`8245`).
909+
- Bug in plotting methods modifying the global matplotlib rcParams (:issue:`8242`).

0 commit comments

Comments
 (0)