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

Method setup

asv_bench/benchmarks/ctors.py:123–130  ·  asv_bench/benchmarks/ctors.py::DatetimeIndexConstructor.setup
(self)

Source from the content-addressed store, hash-verified

121
122class DatetimeIndexConstructor:
123 def setup(self):
124 N = 20_000
125 dti = date_range(class="st">"1900-01-01", periods=N)
126
127 self.list_of_timestamps = dti.tolist()
128 self.list_of_dates = dti.date.tolist()
129 self.list_of_datetimes = dti.to_pydatetime().tolist()
130 self.list_of_str = dti.strftime(class="st">"%Y-%m-%d").tolist()
131
132 def time_from_list_of_timestamps(self):
133 DatetimeIndex(self.list_of_timestamps)

Callers

nothing calls this directly

Calls 4

date_rangeFunction · 0.90
tolistMethod · 0.45
to_pydatetimeMethod · 0.45
strftimeMethod · 0.45

Tested by

no test coverage detected