Skip to content

Commit fba3685

Browse files
committed
Final Updated Docstring
1 parent b757763 commit fba3685

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,16 +1973,15 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
19731973
19741974
Examples
19751975
--------
1976-
In the example below, We put the date range from 01 March 2018 to
1977-
08 March 2018 & convert this to US/Eastern Time zone
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
19781977
19791978
>>> df = pd.date_range('2018-03-01', '2018-03-08')
1980-
>>> df
1981-
DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
1979+
>>> df
1980+
DatetimeIndex(['2018-03-01', '2018-03-02', '2018-03-03', '2018-03-04',
19821981
'2018-03-05', '2018-03-06', '2018-03-07', '2018-03-08'],
19831982
dtype='datetime64[ns]', freq='D')
1984-
>>> df.tz_localize(tz='US/Eastern')
1985-
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',
19861985
'2018-03-03 00:00:00-05:00', '2018-03-04 00:00:00-05:00',
19871986
'2018-03-05 00:00:00-05:00', '2018-03-06 00:00:00-05:00',
19881987
'2018-03-07 00:00:00-05:00', '2018-03-08 00:00:00-05:00'],

0 commit comments

Comments
 (0)