@@ -1937,9 +1937,9 @@ def tz_convert(self, tz):
1937
1937
mapping = {True : 'infer' , False : 'raise' })
1938
1938
def tz_localize (self , tz , ambiguous = 'raise' , errors = 'raise' ):
1939
1939
"""
1940
- Convert aware Datetime index to TimeZone aware Datetime index.
1940
+ Convert aware Datetime index to TimeZone aware Datetime index.
1941
1941
1942
- Localize timezone-naive DatetimeIndex to given time zone , or
1942
+ Localize timezone-naive DatetimeIndex to given time zone , or
1943
1943
remove timezone from timezone aware DatetimeIndex
1944
1944
1945
1945
@@ -1972,18 +1972,18 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
1972
1972
-------
1973
1973
localized : DatetimeIndex
1974
1974
1975
- Examples
1975
+ Examples
1976
1976
--------
1977
1977
In the example below, We put the date range from 01 March 2018 to
1978
1978
08 March 2018 & convert this to US/Eastern Time zone
1979
1979
1980
1980
>>> df = pd.date_range('2018-03-01', '2018-03-08')
1981
1981
>>> df
1982
- DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
1982
+ DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
1983
1983
'2018-03-05', '2018-03-06', '2018-03-07', '2018-03-08'],
1984
1984
dtype='datetime64[ns]', freq='D')
1985
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',
1986
+ DatetimeIndex(['2018-03-01 00:00:00-05:00', '2018-03-02 00:00:00-05:00',
1987
1987
'2018-03-03 00:00:00-05:00', '2018-03-04 00:00:00-05:00',
1988
1988
'2018-03-05 00:00:00-05:00', '2018-03-06 00:00:00-05:00',
1989
1989
'2018-03-07 00:00:00-05:00', '2018-03-08 00:00:00-05:00'],
@@ -1992,7 +1992,7 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
1992
1992
Raises
1993
1993
------
1994
1994
TypeError
1995
- If the DatetimeIndex is tz-aware and tz is not None.
1995
+ If the DatetimeIndex is tz-aware and tz is not None.
1996
1996
"""
1997
1997
if self .tz is not None :
1998
1998
if tz is None :
0 commit comments