Skip to content

Commit 4317676

Browse files
phoflnoatamir
authored andcommitted
ASV: Add asv for clip with date range (pandas-dev#48105)
* ASV: Add asv for clip with date range * ASV: Add asv for clip with date range ASV: Add asv for clip with date range * Fix asv * Remove * Remove type
1 parent 155898f commit 4317676

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

asv_bench/benchmarks/series_methods.py

+10
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ def time_clip(self, n):
144144
self.s.clip(0, 1)
145145

146146

147+
class ClipDt:
148+
def setup(self):
149+
dr = date_range("20220101", periods=100_000, freq="s", tz="UTC")
150+
self.clipper_dt = dr[0:1_000].repeat(100)
151+
self.s = Series(dr)
152+
153+
def time_clip(self):
154+
self.s.clip(upper=self.clipper_dt)
155+
156+
147157
class ValueCounts:
148158

149159
params = [[10**3, 10**4, 10**5], ["int", "uint", "float", "object"]]

0 commit comments

Comments
 (0)