Skip to content

Commit f6e9be7

Browse files
committed
flip cache to True for 'read_csv'
1 parent be3b598 commit f6e9be7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

pandas/io/parsers.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -3168,15 +3168,21 @@ def converter(*date_cols):
31683168
box=False,
31693169
dayfirst=dayfirst,
31703170
errors='ignore',
3171-
infer_datetime_format=infer_datetime_format
3171+
infer_datetime_format=infer_datetime_format,
3172+
cache=True
31723173
)
31733174
except ValueError:
31743175
return tools.to_datetime(
3175-
parsing.try_parse_dates(strs, dayfirst=dayfirst))
3176+
parsing.try_parse_dates(strs, dayfirst=dayfirst),
3177+
cache=True
3178+
)
31763179
else:
31773180
try:
31783181
result = tools.to_datetime(
3179-
date_parser(*date_cols), errors='ignore')
3182+
date_parser(*date_cols),
3183+
errors='ignore',
3184+
cache=True
3185+
)
31803186
if isinstance(result, datetime.datetime):
31813187
raise Exception('scalar parser')
31823188
return result
@@ -3186,7 +3192,9 @@ def converter(*date_cols):
31863192
parsing.try_parse_dates(_concat_date_cols(date_cols),
31873193
parser=date_parser,
31883194
dayfirst=dayfirst),
3189-
errors='ignore')
3195+
errors='ignore',
3196+
cache=True
3197+
)
31903198
except Exception:
31913199
return generic_parser(date_parser, *date_cols)
31923200

0 commit comments

Comments
 (0)