Skip to content

Commit cdffff8

Browse files
author
Sylvain MARIE
committed
added two comments for maintenance, about speed
1 parent 0beed46 commit cdffff8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_libs/tslib.pyx

+2
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def format_array_from_datetime(
170170

171171
ts = Timestamp(val, tz=tz)
172172
if format is None:
173+
# Use datetime.str, that returns ts.isoformat(sep=' ')
173174
result[i] = str(ts)
174175
else:
175176

@@ -178,6 +179,7 @@ def format_array_from_datetime(
178179
try:
179180
result[i] = ts.strftime(format)
180181
except ValueError:
182+
# Use datetime.str, that returns ts.isoformat(sep=' ')
181183
result[i] = str(ts)
182184

183185
return result

0 commit comments

Comments
 (0)