@@ -281,6 +281,43 @@ that the dates have been converted to UTC
281
281
.. ipython:: python
282
282
pd.to_datetime(["2015-11-18 15:30:00+05:30", "2015-11-18 16:30:00+06:30"], utc=True)
283
283
284
+ .. _whatsnew_0240.api_breaking.period_end_time:
285
+
286
+ Time values in ``dt.end_time`` and ``to_timestamp(how='end')``
287
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
288
+
289
+ The time values in :class:`Period` and :class:`PeriodIndex` objects are now set
290
+ to '23:59:59.999999999' when calling :attr:`Series.dt.end_time`, :attr:`Period.end_time`,
291
+ :attr:`PeriodIndex.end_time`, :func:`Period.to_timestamp()` with ``how='end'``,
292
+ or :func:`PeriodIndex.to_timestamp()` with ``how='end'`` (:issue:`17157`)
293
+
294
+ Previous Behavior:
295
+
296
+ .. code-block:: ipython
297
+
298
+ In [2]: p = pd.Period('2017-01-01', 'D')
299
+ In [3]: pi = pd.PeriodIndex([p])
300
+
301
+ In [4]: pd.Series(pi).dt.end_time[0]
302
+ Out[4]: Timestamp(2017-01-01 00:00:00)
303
+
304
+ In [5]: p.end_time
305
+ Out[5]: Timestamp(2017-01-01 23:59:59.999999999)
306
+
307
+ Current Behavior:
308
+
309
+ Calling :attr:`Series.dt.end_time` will now result in a time of '23:59:59.999999999' as
310
+ is the case with :attr:`Period.end_time`, for example
311
+
312
+ .. ipython:: python
313
+
314
+ p = pd.Period('2017-01-01', 'D')
315
+ pi = pd.PeriodIndex([p])
316
+
317
+ pd.Series(pi).dt.end_time[0]
318
+
319
+ p.end_time
320
+
284
321
.. _whatsnew_0240.api.datetimelike.normalize:
285
322
286
323
Tick DateOffset Normalize Restrictions
@@ -615,6 +652,7 @@ Reshaping
615
652
- Bug in :meth:`Series.combine_first` with ``datetime64[ns, tz]`` dtype which would return tz-naive result (:issue:`21469`)
616
653
- Bug in :meth:`Series.where` and :meth:`DataFrame.where` with ``datetime64[ns, tz]`` dtype (:issue:`21546`)
617
654
- Bug in :meth:`Series.mask` and :meth:`DataFrame.mask` with ``list`` conditionals (:issue:`21891`)
655
+ - Bug in :meth:`DataFrame.replace` raises RecursionError when converting OutOfBounds ``datetime64[ns, tz]`` (:issue:`20380`)
618
656
- :func:`pandas.core.groupby.GroupBy.rank` now raises a ``ValueError`` when an invalid value is passed for argument ``na_option`` (:issue:`22124`)
619
657
-
620
658
0 commit comments