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

Method setup

asv_bench/benchmarks/io/csv.py:153–159  ·  view source on GitHub ↗
(self, nobs, freq)

Source from the content-addressed store, hash-verified

151 param_names = ["nobs", "freq"]
152
153 def setup(self, nobs, freq):
154 rng = period_range(start="2000-01-01", periods=nobs, freq=freq)
155 self.data = DataFrame({"a": 1}, index=rng)
156 if freq == "D":
157 self.default_fmt = "%Y-%m-%d"
158 elif freq == "h":
159 self.default_fmt = "%Y-%m-%d %H:00"
160
161 def time_frame_period_formatting_index(self, nobs, freq):
162 self.data.to_csv(self.fname, date_format="%Y-%m-%d___%H:%M:%S")

Callers

nothing calls this directly

Calls 2

period_rangeFunction · 0.90
DataFrameClass · 0.90

Tested by

no test coverage detected