Skip to content

Commit eb30608

Browse files
committed
Add benchmark to touch changes in guess_datetime_format
1 parent 4764928 commit eb30608

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

asv_bench/benchmarks/inference.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,16 @@ def time_dup_string_tzoffset_dates(self, cache):
277277
to_datetime(self.dup_string_with_tz, cache=cache)
278278

279279

280+
# GH 43901
281+
class ToDatetimeInferDatetimeFormat:
282+
def setup(self):
283+
rng = date_range(start="1/1/2000", periods=100000, freq="H")
284+
self.strings = rng.strftime("%Y-%m-%d %H:%M:%S").tolist()
285+
286+
def time_infer_datetime_format(self):
287+
to_datetime(self.strings, infer_datetime_format=True)
288+
289+
280290
class ToTimedelta:
281291
def setup(self):
282292
self.ints = np.random.randint(0, 60, size=10000)

0 commit comments

Comments
 (0)