Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33c96e2

Browse files
committedJun 28, 2022
try improving
1 parent f81ac72 commit 33c96e2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎pandas/_libs/tslibs/parsing.pyx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ _DEFAULT_DATETIME = datetime(1, 1, 1).replace(hour=0, minute=0,
8585
second=0, microsecond=0)
8686

8787
PARSING_WARNING_MSG = (
88-
"Parsing '{date_string}' in {format} format. Provide format "
89-
"or specify infer_datetime_format=True for consistent parsing."
88+
"Parsing dates in {format} format when dayfirst={dayfirst} was specified. "
89+
"This may lead to inconsistently-parsed dates! Specify a format "
90+
"for consistent parsing."
9091
)
9192

9293
cdef:
@@ -186,7 +187,8 @@ cdef inline object _parse_delimited_date(str date_string, bint dayfirst):
186187
warnings.warn(
187188
PARSING_WARNING_MSG.format(
188189
date_string=date_string,
189-
format='MM/DD/YYYY'
190+
format='MM/DD/YYYY',
191+
dayfirst='True',
190192
),
191193
stacklevel=4,
192194
)
@@ -195,6 +197,7 @@ cdef inline object _parse_delimited_date(str date_string, bint dayfirst):
195197
PARSING_WARNING_MSG.format(
196198
date_string=date_string,
197199
format='DD/MM/YYYY'
200+
dayfirst='False',
198201
),
199202
stacklevel=4,
200203
)

0 commit comments

Comments
 (0)
Please sign in to comment.