We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a1779a commit 793676cCopy full SHA for 793676c
asv_bench/benchmarks/indexing.py
@@ -290,12 +290,24 @@ def setup(self):
290
self.dti = dti
291
self.dti2 = dti2
292
293
+ index = np.random.choice(dti, 10000, replace=True)
294
+ df = DataFrame(index=index, data={"a": 1})
295
+ df_sort = df.sort_index()
296
+ self.df = df
297
+ self.df_sort = df_sort
298
+
299
def time_get_indexer_mismatched_tz(self):
300
# reached via e.g.
301
# ser = Series(range(len(dti)), index=dti)
302
# ser[dti2]
303
self.dti.get_indexer(self.dti2)
304
305
+ def time_loc_unsorted(self):
306
+ self.df.loc["2016-6-11"]
307
308
+ def time_loc_sorted(self):
309
+ self.df_sort.loc["2016-6-11"]
310
311
312
class CategoricalIndexIndexing:
313
0 commit comments