@@ -1084,7 +1084,7 @@ in the usual way.
1084
1084
dt + bmth_us
1085
1085
1086
1086
# Define date index with custom offset
1087
- pd.DatetimeIndex (start = ' 20100101' , end = ' 20120101' , freq = bmth_us)
1087
+ pd.date_range (start = ' 20100101' , end = ' 20120101' , freq = bmth_us)
1088
1088
1089
1089
.. note ::
1090
1090
@@ -1438,8 +1438,8 @@ or ``Timestamp`` objects.
1438
1438
1439
1439
.. ipython :: python
1440
1440
1441
- pd.DatetimeIndex (start = ' 7/1/2012' , end = ' 7/10/2012' ,
1442
- freq = pd.offsets.CDay(calendar = cal)).to_pydatetime()
1441
+ pd.date_range (start = ' 7/1/2012' , end = ' 7/10/2012' ,
1442
+ freq = pd.offsets.CDay(calendar = cal)).to_pydatetime()
1443
1443
offset = pd.offsets.CustomBusinessDay(calendar = cal)
1444
1444
datetime.datetime(2012 , 5 , 25 ) + offset
1445
1445
datetime.datetime(2012 , 7 , 3 ) + offset
@@ -2300,8 +2300,8 @@ To remove timezone from tz-aware ``DatetimeIndex``, use ``tz_localize(None)`` or
2300
2300
2301
2301
.. ipython :: python
2302
2302
2303
- didx = pd.DatetimeIndex (start = ' 2014-08-01 09:00' , freq = ' H' ,
2304
- periods = 10 , tz = ' US/Eastern' )
2303
+ didx = pd.date_range (start = ' 2014-08-01 09:00' , freq = ' H' ,
2304
+ periods = 10 , tz = ' US/Eastern' )
2305
2305
didx
2306
2306
didx.tz_localize(None )
2307
2307
didx.tz_convert(None )
@@ -2354,8 +2354,8 @@ constructor as well as ``tz_localize``.
2354
2354
rng_hourly.tz_localize(' US/Eastern' , ambiguous = rng_hourly_dst).to_list()
2355
2355
rng_hourly.tz_localize(' US/Eastern' , ambiguous = ' NaT' ).to_list()
2356
2356
2357
- didx = pd.DatetimeIndex (start = ' 2014-08-01 09:00' , freq = ' H' ,
2358
- periods = 10 , tz = ' US/Eastern' )
2357
+ didx = pd.date_range (start = ' 2014-08-01 09:00' , freq = ' H' ,
2358
+ periods = 10 , tz = ' US/Eastern' )
2359
2359
didx
2360
2360
didx.tz_localize(None )
2361
2361
didx.tz_convert(None )
0 commit comments