File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1202,6 +1202,38 @@ def is_monotonic_decreasing(self):
1202
1202
"""
1203
1203
return self ._engine .is_monotonic_decreasing
1204
1204
1205
+ @property
1206
+ def is_strictly_monotonic_increasing (self ):
1207
+ """return if the index is strictly monotonic increasing
1208
+ (only increasing) values
1209
+
1210
+ Examples
1211
+ --------
1212
+ >>> Index([1, 2, 3]).is_strictly_monotonic_increasing
1213
+ True
1214
+ >>> Index([1, 2, 2]).is_strictly_monotonic_increasing
1215
+ False
1216
+ >>> Index([1, 3, 2]).is_strictly_monotonic_increasing
1217
+ False
1218
+ """
1219
+ return self .is_unique and self .is_monotonic_increasing
1220
+
1221
+ @property
1222
+ def is_strictly_monotonic_decreasing (self ):
1223
+ """return if the index is strictly monotonic decreasing
1224
+ (only decreasing) values
1225
+
1226
+ Examples
1227
+ --------
1228
+ >>> Index([3, 2, 1]).is_strictly_monotonic_decreasing
1229
+ True
1230
+ >>> Index([3, 2, 2]).is_strictly_monotonic_decreasing
1231
+ False
1232
+ >>> Index([3, 1, 2]).is_strictly_monotonic_decreasing
1233
+ False
1234
+ """
1235
+ return self .is_unique and self .is_monotonic_decreasing
1236
+
1205
1237
def is_lexsorted_for_tuple (self , tup ):
1206
1238
return True
1207
1239
You can’t perform that action at this time.
0 commit comments