Skip to content

Commit c16e3b8

Browse files
committed
DOC: versionadded directions added where needed
1 parent 955607c commit c16e3b8

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

doc/source/api.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ These can be accessed like ``Series.dt.<property>``.
488488
Series.dt.second
489489
Series.dt.microsecond
490490
Series.dt.nanosecond
491-
Series.dt.second
492491
Series.dt.week
493492
Series.dt.weekofyear
494493
Series.dt.dayofweek
@@ -538,6 +537,7 @@ These can be accessed like ``Series.dt.<property>``.
538537
:template: autosummary/accessor_method.rst
539538

540539
Series.dt.to_pytimedelta
540+
Series.dt.total_seconds
541541

542542
String handling
543543
~~~~~~~~~~~~~~~
@@ -1439,6 +1439,7 @@ Time-specific operations
14391439
:toctree: generated/
14401440

14411441
DatetimeIndex.normalize
1442+
DatetimeIndex.strftime
14421443
DatetimeIndex.snap
14431444
DatetimeIndex.tz_convert
14441445
DatetimeIndex.tz_localize

doc/source/whatsnew/v0.17.0.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ has been changed to make this keyword unnecessary - the change is shown below.
257257
Other enhancements
258258
^^^^^^^^^^^^^^^^^^
259259

260-
- ``pd.read_sql`` and ``to_sql`` can accept database URI as con parameter (:issue:`10214`)
260+
- ``pd.read_sql`` and ``to_sql`` can accept database URI as ``con`` parameter (:issue:`10214`)
261261
- Enable ``pd.read_hdf`` to be used without specifying a key when the HDF file contains a single dataset (:issue:`10443`)
262262
- Enable writing Excel files in :ref:`memory <_io.excel_writing_buffer>` using StringIO/BytesIO (:issue:`7074`)
263263
- Enable serialization of lists and dicts to strings in ``ExcelWriter`` (:issue:`8188`)
@@ -444,7 +444,7 @@ We have also deprecated and changed similar methods in two Series-like classes,
444444
Previous Replacement
445445
================================== ====================================
446446
\* ``Index.order()`` ``Index.sort_values()``
447-
\* ``Categorical.order()`` ``Categorical.sort_values``
447+
\* ``Categorical.order()`` ``Categorical.sort_values()``
448448
================================== ====================================
449449

450450
.. _whatsnew_0170.api_breaking.to_datetime:
@@ -817,7 +817,7 @@ Other API Changes
817817
^^^^^^^^^^^^^^^^^
818818

819819
- Line and kde plot with ``subplots=True`` now uses default colors, not all black. Specify ``color='k'`` to draw all lines in black (:issue:`9894`)
820-
- Calling the ``.value_counts`` method on a Series with ``categorical`` dtype now returns a Series with a ``CategoricalIndex`` (:issue:`10704`)
820+
- Calling the ``.value_counts()`` method on a Series with ``categorical`` dtype now returns a Series with a ``CategoricalIndex`` (:issue:`10704`)
821821
- Allow passing `kwargs` to the interpolation methods (:issue:`10378`).
822822
- The metadata properties of subclasses of pandas objects will now be serialized (:issue:`10553`).
823823
- ``groupby`` using ``Categorical`` follows the same rule as ``Categorical.unique`` described above (:issue:`10508`)
@@ -848,7 +848,7 @@ Deprecations
848848
Deprecated Function Replacement
849849
===================== =================================
850850
``.irow(i)`` ``.iloc[i]`` or ``.iat[i]``
851-
``.iget(i)`` ``.iloc[i]``
851+
``.iget(i)`` ``.iloc[i]`` or ``.iat[i]``
852852
``.iget_value(i)`` ``.iloc[i]`` or ``.iat[i]``
853853
===================== =================================
854854

@@ -987,7 +987,7 @@ Bug Fixes
987987
- Bug in ``Series.shift`` and ``DataFrame.shift`` not supporting categorical data (:issue:`9416`)
988988
- Bug in ``Series.map`` using categorical ``Series`` raises ``AttributeError`` (:issue:`10324`)
989989
- Bug in ``MultiIndex.get_level_values`` including ``Categorical`` raises ``AttributeError`` (:issue:`10460`)
990-
- Bug in ``pd.get_dummies`` with `sparse=True` not returning ``SparseDataFrame`` (:issue:`10531`)
990+
- Bug in ``pd.get_dummies`` with ``sparse=True`` not returning ``SparseDataFrame`` (:issue:`10531`)
991991
- Bug in ``Index`` subtypes (such as ``PeriodIndex``) not returning their own type for ``.drop`` and ``.insert`` methods (:issue:`10620`)
992992
- Bug in ``algos.outer_join_indexer`` when ``right`` array is empty (:issue:`10618`)
993993

pandas/core/generic.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,8 @@ def as_blocks(self, copy=True):
24722472
----------
24732473
copy : boolean, default True
24742474
2475+
.. versionadded: 0.16.1
2476+
24752477
Returns
24762478
-------
24772479
values : a dict of dtype -> Constructor Types
@@ -3275,8 +3277,8 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
32753277
effectively "SQL-style" grouped output
32763278
sort : boolean, default True
32773279
Sort group keys. Get better performance by turning this off.
3278-
Note this does not influence the order of observations within each group.
3279-
groupby preserves the order of rows within each group.
3280+
Note this does not influence the order of observations within each group.
3281+
groupby preserves the order of rows within each group.
32803282
group_keys : boolean, default True
32813283
When calling apply, add group keys to index to identify pieces
32823284
squeeze : boolean, default False

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -824,15 +824,15 @@ def iget(self, i, axis=0):
824824
DEPRECATED. Use ``.iloc[i]`` or ``.iat[i]`` instead
825825
"""
826826

827-
warnings.warn("iget(i) is deprecated. Please use .iloc[i]",
827+
warnings.warn("iget(i) is deprecated. Please use .iloc[i] or .iat[i]",
828828
FutureWarning, stacklevel=2)
829829
return self._ixs(i)
830830

831831
def irow(self, i, axis=0):
832832
"""
833833
DEPRECATED. Use ``.iloc[i]`` or ``.iat[i]`` instead
834834
"""
835-
warnings.warn("irow(i) is deprecated. Please use .iloc[i] or iat[i]",
835+
warnings.warn("irow(i) is deprecated. Please use .iloc[i] or .iat[i]",
836836
FutureWarning, stacklevel=2)
837837
return self._ixs(i)
838838

pandas/tseries/base.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def strftime(self, date_format):
2828
of the string format can be found in the `python string format doc
2929
<https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior>`__
3030
31+
.. versionadded:: 0.17.0
32+
3133
Parameters
3234
----------
3335
date_format : str

pandas/tseries/tdi.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,11 @@ def f(x):
400400
return result
401401

402402
def total_seconds(self):
403-
""" Total duration of each element expressed in seconds. """
403+
"""
404+
Total duration of each element expressed in seconds.
405+
406+
.. versionadded:: 0.17.0
407+
"""
404408
return self._maybe_mask_results(1e-9*self.asi8)
405409

406410
def to_pytimedelta(self):

pandas/tseries/tools.py

+3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
199199
- If both dayfirst and yearfirst are True, yearfirst is preceded (same as dateutil).
200200
Warning: yearfirst=True is not strict, but will prefer to parse
201201
with year first (this is a known bug, based on dateutil beahavior).
202+
203+
.. versionadded: 0.16.1
204+
202205
utc : boolean, default None
203206
Return UTC DatetimeIndex if True (converting any tz-aware
204207
datetime.datetime objects as well).

0 commit comments

Comments
 (0)