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

Method setup

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

Source from the content-addressed store, hash-verified

123 param_names = ["nobs", "freq"]
124
125 def setup(self, nobs, freq):
126 rng = period_range(start="2000-01-01", periods=nobs, freq=freq)
127 self.data = DataFrame(rng)
128 if freq == "D":
129 self.default_fmt = "%Y-%m-%d"
130 elif freq == "h":
131 self.default_fmt = "%Y-%m-%d %H:00"
132
133 def time_frame_period_formatting_default(self, nobs, freq):
134 self.data.to_csv(self.fname)

Callers

nothing calls this directly

Calls 2

period_rangeFunction · 0.90
DataFrameClass · 0.90

Tested by

no test coverage detected