MCPcopy
hub / github.com/pandas-dev/pandas / setup

Method setup

asv_bench/benchmarks/hash_functions.py:17–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15class Float64GroupIndex:
16 # GH28303
17 def setup(self):
18 self.df = pd.date_range(
19 start="1/1/2018", end="1/2/2018", periods=10**6
20 ).to_frame()
21 self.group_index = np.round(self.df.index.astype(int) / 10**9)
22
23 def time_groupby(self):
24 self.df.groupby(self.group_index).last()

Callers

nothing calls this directly

Calls 3

to_frameMethod · 0.45
roundMethod · 0.45
astypeMethod · 0.45

Tested by

no test coverage detected