@@ -1022,22 +1022,23 @@ def date_range(
1022
1022
'2018-01-05 00:00:00+09:00'],
1023
1023
dtype='datetime64[ns, Asia/Tokyo]', freq='D')
1024
1024
1025
- `closed ` controls whether to include `start` and `end` that are on the
1026
- boundary. The default includes boundary points on either end.
1025
+ `inclusive ` controls whether to include `start` and `end` that are on the
1026
+ boundary. The default, "both", includes boundary points on either end.
1027
1027
1028
- >>> pd.date_range(start='2017-01-01', end='2017-01-04', closed=None )
1028
+ >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive="both" )
1029
1029
DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03', '2017-01-04'],
1030
1030
dtype='datetime64[ns]', freq='D')
1031
1031
1032
- Use ``closed ='left'`` to exclude `end` if it falls on the boundary.
1032
+ Use ``inclusive ='left'`` to exclude `end` if it falls on the boundary.
1033
1033
1034
- >>> pd.date_range(start='2017-01-01', end='2017-01-04', closed ='left')
1034
+ >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive ='left')
1035
1035
DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03'],
1036
1036
dtype='datetime64[ns]', freq='D')
1037
1037
1038
- Use ``closed='right'`` to exclude `start` if it falls on the boundary.
1038
+ Use ``inclusive='right'`` to exclude `start` if it falls on the boundary, and
1039
+ similarly ``inclusive='neither'`` will exclude both `start` and `end`.
1039
1040
1040
- >>> pd.date_range(start='2017-01-01', end='2017-01-04', closed ='right')
1041
+ >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive ='right')
1041
1042
DatetimeIndex(['2017-01-02', '2017-01-03', '2017-01-04'],
1042
1043
dtype='datetime64[ns]', freq='D')
1043
1044
"""
0 commit comments