Skip to content

Commit 26bade0

Browse files
author
cloudboat
committed
fix run doctests
1 parent 6fcd50d commit 26bade0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

pandas/core/arrays/datetimelike.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,12 +2353,12 @@ def round(
23532353
>>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")
23542354
23552355
>>> rng_tz.floor("2h", ambiguous=False)
2356-
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
2357-
dtype='datetime64[s, Europe/Amsterdam]', freq=None)
2356+
DatetimeIndex(['2021-10-31 02:00:00+01:00'],dtype=(
2357+
'datetime64[s, Europe/Amsterdam]'), freq=None)
23582358
23592359
>>> rng_tz.floor("2h", ambiguous=True)
2360-
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
2361-
dtype='datetime64[s, Europe/Amsterdam]', freq=None)
2360+
DatetimeIndex(['2021-10-31 02:00:00+02:00'],dtype=(
2361+
'datetime64[s, Europe/Amsterdam]'), freq=None)
23622362
"""
23632363
return self._round(freq, RoundTo.NEAREST_HALF_EVEN, ambiguous, nonexistent)
23642364

@@ -2439,9 +2439,9 @@ def floor(
24392439
dtype='datetime64[ns]', freq='min')
24402440
24412441
>>> rng.floor("h")
2442-
DatetimeIndex(['2018-01-01 11:00:00', '2018-01-01 12:00:00',
2443-
'2018-01-01 12:00:00'],
2444-
dtype='datetime64[ns]', freq=None)
2442+
DatetimeIndex(['2018-01-01 11:00:00', '2018-01-01 12:00:00',
2443+
'2018-01-01 12:00:00'],
2444+
dtype='datetime64[ns]', freq=None)
24452445
24462446
**Series**
24472447
@@ -2456,11 +2456,11 @@ def floor(
24562456
24572457
>>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")
24582458
2459-
>>> rng_tz.floor("2h", ambiguous=False)
2459+
>>> rng_tz.floor("2h", ambiguous=False) # doctest: +NORMALIZE_WHITESPACE
24602460
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
24612461
dtype='datetime64[s, Europe/Amsterdam]', freq=None)
24622462
2463-
>>> rng_tz.floor("2h", ambiguous=True)
2463+
>>> rng_tz.floor("2h", ambiguous=True) # doctest: +NORMALIZE_WHITESPACE
24642464
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
24652465
dtype='datetime64[s, Europe/Amsterdam]', freq=None)
24662466
"""
@@ -2543,9 +2543,9 @@ def ceil(
25432543
dtype='datetime64[ns]', freq='min')
25442544
25452545
>>> rng.ceil("h")
2546-
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
2547-
'2018-01-01 13:00:00'],
2548-
dtype='datetime64[ns]', freq=None)
2546+
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
2547+
'2018-01-01 13:00:00'],
2548+
dtype='datetime64[ns]', freq=None)
25492549
25502550
**Series**
25512551

0 commit comments

Comments
 (0)