Skip to content

Commit ca813e6

Browse files
author
IHackPY
committed
Changes according to instruction
1 parent 9bd697d commit ca813e6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,18 +1937,18 @@ def tz_convert(self, tz):
19371937
mapping={True: 'infer', False: 'raise'})
19381938
def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19391939
"""
1940-
DatetimeIndex.tz_localize used for Localize tz-naive DatetimeIndex.
1941-
1942-
tz_localize method is use to convert naive DatetimeIndex into any other localize
1943-
DatetimeIndex
1940+
DatetimeIndex.tz_localize used for Localize tz-naive DatetimeIndex.
1941+
1942+
tz_localize method is use to convert naive DatetimeIndex into any other
1943+
localize DatetimeIndex
19441944
19451945
19461946
Parameters
19471947
----------
19481948
tz : string, pytz.timezone, dateutil.tz.tzfile or None
19491949
Time zone for time. Corresponding timestamps would be converted to
19501950
time zone of the TimeSeries.
1951-
None will remove timezone holding local time
1951+
None will remove timezone holding local time.
19521952
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
19531953
- 'infer' will attempt to infer fall dst-transition hours based on
19541954
order
@@ -1974,10 +1974,9 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19741974
19751975
Examples
19761976
--------
1977-
In the example below, We put the date range from 01 March 2018 to 08 March 2018
1978-
& convert this to US/Eastern Time zone
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
19791979
1980-
>>> import pandas as pd
19811980
>>> df = pd.date_range('2018-03-01', '2018-03-08')
19821981
>>> df
19831982
DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
@@ -1993,7 +1992,7 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19931992
Raises
19941993
------
19951994
TypeError
1996-
If the DatetimeIndex is tz-aware and tz is not None
1995+
If the DatetimeIndex is tz-aware and tz is not None.
19971996
"""
19981997
if self.tz is not None:
19991998
if tz is None:

0 commit comments

Comments
 (0)