Skip to content

Commit a69aeca

Browse files
author
Sylvain MARIE
committed
Added a docstring explaining why the ASV bench with custom date format was improved: the date_format parameter is not taken into account today.
1 parent 28d8b5d commit a69aeca

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

asv_bench/benchmarks/io/csv.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,16 @@ def setup(self, obs, fq):
109109
rng = period_range(start="2000-01-01", periods=obs, freq=fq)
110110
self.data = DataFrame(rng)
111111

112-
def time_frame_period_formatting(self, obs, fq):
113-
self.data.to_csv(self.fname, date_format="%Y-%m-%d___%H:%M:%S")
114-
115112
def time_frame_period_no_format(self, obs, fq):
116113
self.data.to_csv(self.fname)
117114

115+
def time_frame_period_formatting(self, obs, fq):
116+
"""IMPORTANT: date_format is not actually taken into account here today
117+
So the behaviour and perf is identical to `time_frame_period_no_format` above.
118+
Not sure if this is a bug or a desired feature. Keeping the ASV for reference
119+
for now"""
120+
self.data.to_csv(self.fname, date_format="%Y-%m-%d___%H:%M:%S")
121+
118122

119123
class ToCSVPeriodIndex(BaseIO):
120124
fname = "__test__.csv"

0 commit comments

Comments
 (0)