Skip to content

Commit 004ea2c

Browse files
committed
DOC: small whatsnew edits
1 parent ae3b228 commit 004ea2c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

doc/source/whatsnew/v0.17.0.txt

+11-6
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ Other enhancements
237237

238238
- ``pandas.tseries.offsets`` larger than the ``Day`` offset can now be used with with ``Series`` for addition/subtraction (:issue:`10699`). See the :ref:`Documentation <timeseries.offsetseries>` for more details.
239239

240-
- ``pd.Series`` of type ``timedelta64`` has new method ``.dt.total_seconds()`` returning the duration of the timedelta in seconds (:issue: `10817`)
240+
- ``pd.Series`` of type ``timedelta64`` has new method ``.dt.total_seconds()`` returning the duration of the timedelta in seconds (:issue:`10817`)
241241

242-
- ``pd.Timedelta.total_seconds()`` now returns Timedelta duration to ns precision (previously microsecond precision) (:issue: `10939`)
242+
- ``pd.Timedelta.total_seconds()`` now returns Timedelta duration to ns precision (previously microsecond precision) (:issue:`10939`)
243243

244244
- ``.as_blocks`` will now take a ``copy`` optional argument to return a copy of the data, default is to copy (no change in behavior from prior versions), (:issue:`9607`)
245245
- ``regex`` argument to ``DataFrame.filter`` now handles numeric column names instead of raising ``ValueError`` (:issue:`10384`).
@@ -264,19 +264,24 @@ Other enhancements
264264
s.drop_duplicates(keep='last')
265265
s.drop_duplicates(keep=False)
266266

267-
- Reindex now has a ``tolerance`` argument that allows for finer control of :ref:`basics.limits_on_reindex_fill`:
267+
- Reindex now has a ``tolerance`` argument that allows for finer control of :ref:`basics.limits_on_reindex_fill` (:issue:`10411`):
268268

269269
.. ipython:: python
270270

271-
df = pd.DataFrame({'x': range(5), 't': pd.date_range('2000-01-01', periods=5)})
272-
df.reindex([0.1, 1.9, 3.5], method='nearest', tolerance=0.2)
271+
df = pd.DataFrame({'x': range(5),
272+
't': pd.date_range('2000-01-01', periods=5)})
273+
df.reindex([0.1, 1.9, 3.5],
274+
method='nearest',
275+
tolerance=0.2)
273276

274277
When used on a ``DatetimeIndex``, ``TimedeltaIndex`` or ``PeriodIndex``, ``tolerance`` will coerced into a ``Timedelta`` if possible. This allows you to specify tolerance with a string:
275278

276279
.. ipython:: python
277280

278281
df = df.set_index('t')
279-
df.reindex(pd.to_datetime(['1999-12-31']), method='nearest', tolerance='1 day')
282+
df.reindex(pd.to_datetime(['1999-12-31']),
283+
method='nearest',
284+
tolerance='1 day')
280285

281286
``tolerance`` is also exposed by the lower level ``Index.get_indexer`` and ``Index.get_loc`` methods.
282287

0 commit comments

Comments
 (0)