@@ -1194,20 +1194,110 @@ cdef class Second(Tick):
1194
1194
1195
1195
1196
1196
cdef class Milli(Tick):
1197
+ """
1198
+ Offset ``n`` milliseconds.
1199
+
1200
+ Parameters
1201
+ ----------
1202
+ n : int, default 1
1203
+ The number of milliseconds represented.
1204
+
1205
+ See Also
1206
+ --------
1207
+ :class:`~pandas.tseries.offsets.DateOffset` : Standard kind of date increment.
1208
+
1209
+ Examples
1210
+ --------
1211
+ You can use the parameter ``n`` to represent a shift of n milliseconds.
1212
+
1213
+ >>> from pandas.tseries.offsets import Milli
1214
+ >>> ts = pd.Timestamp(2022, 12, 9, 15)
1215
+ >>> ts
1216
+ Timestamp('2022-12-09 15:00:00')
1217
+
1218
+ >>> ts + Milli(n=10)
1219
+ Timestamp('2022-12-09 15:00:00.010000')
1220
+
1221
+ >>> ts - Milli(n=10)
1222
+ Timestamp('2022-12-09 14:59:59.990000')
1223
+
1224
+ >>> ts + Milli(n=-10)
1225
+ Timestamp('2022-12-09 14:59:59.990000')
1226
+ """
1197
1227
_nanos_inc = 1 _000_000
1198
1228
_prefix = " ms"
1199
1229
_period_dtype_code = PeriodDtypeCode.L
1200
1230
_creso = NPY_DATETIMEUNIT.NPY_FR_ms
1201
1231
1202
1232
1203
1233
cdef class Micro(Tick):
1234
+ """
1235
+ Offset ``n`` microseconds.
1236
+
1237
+ Parameters
1238
+ ----------
1239
+ n : int, default 1
1240
+ The number of microseconds represented.
1241
+
1242
+ See Also
1243
+ --------
1244
+ :class:`~pandas.tseries.offsets.DateOffset` : Standard kind of date increment.
1245
+
1246
+ Examples
1247
+ --------
1248
+ You can use the parameter ``n`` to represent a shift of n microseconds.
1249
+
1250
+ >>> from pandas.tseries.offsets import Micro
1251
+ >>> ts = pd.Timestamp(2022, 12, 9, 15)
1252
+ >>> ts
1253
+ Timestamp('2022-12-09 15:00:00')
1254
+
1255
+ >>> ts + Micro(n=1000)
1256
+ Timestamp('2022-12-09 15:00:00.001000')
1257
+
1258
+ >>> ts - Micro(n=1000)
1259
+ Timestamp('2022-12-09 14:59:59.999000')
1260
+
1261
+ >>> ts + Micro(n=-1000)
1262
+ Timestamp('2022-12-09 14:59:59.999000')
1263
+ """
1204
1264
_nanos_inc = 1000
1205
1265
_prefix = " us"
1206
1266
_period_dtype_code = PeriodDtypeCode.U
1207
1267
_creso = NPY_DATETIMEUNIT.NPY_FR_us
1208
1268
1209
1269
1210
1270
cdef class Nano(Tick):
1271
+ """
1272
+ Offset ``n`` nanoseconds.
1273
+
1274
+ Parameters
1275
+ ----------
1276
+ n : int, default 1
1277
+ The number of nanoseconds represented.
1278
+
1279
+ See Also
1280
+ --------
1281
+ :class:`~pandas.tseries.offsets.DateOffset` : Standard kind of date increment.
1282
+
1283
+ Examples
1284
+ --------
1285
+ You can use the parameter ``n`` to represent a shift of n nanoseconds.
1286
+
1287
+ >>> from pandas.tseries.offsets import Nano
1288
+ >>> ts = pd.Timestamp(2022, 12, 9, 15)
1289
+ >>> ts
1290
+ Timestamp('2022-12-09 15:00:00')
1291
+
1292
+ >>> ts + Nano(n=1000)
1293
+ Timestamp('2022-12-09 15:00:00.000001')
1294
+
1295
+ >>> ts - Nano(n=1000)
1296
+ Timestamp('2022-12-09 14:59:59.999999')
1297
+
1298
+ >>> ts + Nano(n=-1000)
1299
+ Timestamp('2022-12-09 14:59:59.999999')
1300
+ """
1211
1301
_nanos_inc = 1
1212
1302
_prefix = " ns"
1213
1303
_period_dtype_code = PeriodDtypeCode.N
@@ -3073,9 +3163,12 @@ cdef class SemiMonthEnd(SemiMonthOffset):
3073
3163
3074
3164
Parameters
3075
3165
----------
3076
- n : int
3166
+ n : int, default 1
3167
+ The number of months represented.
3077
3168
normalize : bool, default False
3169
+ Normalize start/end dates to midnight before generating date range.
3078
3170
day_of_month : int, {1, 3,...,27}, default 15
3171
+ A specific integer for the day of the month.
3079
3172
3080
3173
Examples
3081
3174
--------
@@ -3113,9 +3206,12 @@ cdef class SemiMonthBegin(SemiMonthOffset):
3113
3206
3114
3207
Parameters
3115
3208
----------
3116
- n : int
3209
+ n : int, default 1
3210
+ The number of months represented.
3117
3211
normalize : bool, default False
3118
- day_of_month : int, {2, 3,...,27}, default 15
3212
+ Normalize start/end dates to midnight before generating date range.
3213
+ day_of_month : int, {1, 3,...,27}, default 15
3214
+ A specific integer for the day of the month.
3119
3215
3120
3216
Examples
3121
3217
--------
0 commit comments