Skip to content

Commit 1fe3b34

Browse files
author
IHackPY
committed
update Indentation
1 parent 44b86cd commit 1fe3b34

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,11 +1937,10 @@ def tz_convert(self, tz):
19371937
mapping={True: 'infer', False: 'raise'})
19381938
def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19391939
"""
1940-
Convert aware Datetime index to TimeZone aware Datetime index.
1941-
1942-
Localize timezone-naive DatetimeIndex to given time zone , or
1943-
remove timezone from timezone aware DatetimeIndex
1940+
Convert aware Datetime index to TimeZone naive Datetime index.
19441941
1942+
Localize timezone-naive DatetimeIndex to given time zone,
1943+
or remove timezone from timezone aware DatetimeIndex.
19451944
19461945
Parameters
19471946
----------
@@ -1972,18 +1971,17 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19721971
-------
19731972
localized : DatetimeIndex
19741973
1975-
Examples
1976-
--------
1977-
In the example below, We put the date range from 01 March 2018 to
1978-
08 March 2018 & convert this to US/Eastern Time zone
1974+
Examples
1975+
--------
1976+
In the example below, We put the date range from 01 March 2018 to 08 March 2018 & convert this to US/Eastern Time zone
19791977
1980-
>>> df = pd.date_range('2018-03-01', '2018-03-08')
1981-
>>> df
1982-
DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
1978+
>>> df = pd.date_range('2018-03-01', '2018-03-08')
1979+
>>> df
1980+
DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
19831981
'2018-03-05', '2018-03-06', '2018-03-07', '2018-03-08'],
19841982
dtype='datetime64[ns]', freq='D')
1985-
>>> df.tz_localize(tz='US/Eastern')
1986-
DatetimeIndex(['2018-03-01 00:00:00-05:00', '2018-03-02 00:00:00-05:00',
1983+
>>> df.tz_localize(tz='US/Eastern')
1984+
DatetimeIndex(['2018-03-01 00:00:00-05:00', '2018-03-02 00:00:00-05:00',
19871985
'2018-03-03 00:00:00-05:00', '2018-03-04 00:00:00-05:00',
19881986
'2018-03-05 00:00:00-05:00', '2018-03-06 00:00:00-05:00',
19891987
'2018-03-07 00:00:00-05:00', '2018-03-08 00:00:00-05:00'],
@@ -1992,7 +1990,8 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19921990
Raises
19931991
------
19941992
TypeError
1995-
If the DatetimeIndex is tz-aware and tz is not None.
1993+
If the DatetimeIndex is tz-aware and tz is not None.
1994+
19961995
"""
19971996
if self.tz is not None:
19981997
if tz is None:

0 commit comments

Comments
 (0)