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

Method setup

asv_bench/benchmarks/join_merge.py:212–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

210 # outer join of non-unique
211 # GH 6329
212 def setup(self):
213 date_index = date_range("01-Jan-2013", "23-Jan-2013", freq="min")
214 daily_dates = date_index.to_period("D").to_timestamp("s", "s")
215 self.fracofday = date_index.values - daily_dates.values
216 self.fracofday = self.fracofday.astype("timedelta64[ns]")
217 self.fracofday = self.fracofday.astype(np.float64) / 86_400_000_000_000
218 self.fracofday = Series(self.fracofday, daily_dates)
219 index = date_range(date_index.min(), date_index.max(), freq="D")
220 self.temp = Series(1.0, index)[self.fracofday.index]
221
222 def time_join_non_unique_equal(self):
223 self.fracofday * self.temp

Callers

nothing calls this directly

Calls 7

date_rangeFunction · 0.90
SeriesClass · 0.90
to_timestampMethod · 0.45
to_periodMethod · 0.45
astypeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected