File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -903,8 +903,20 @@ def read_csv(
903
903
"A strict version of it is now the default, see "
904
904
"https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. "
905
905
"You can safely remove this argument." ,
906
+ FutureWarning ,
907
+ stacklevel = find_stack_level (),
908
+ )
909
+ if date_parser is not None :
910
+ warnings .warn (
911
+ "The argument 'date_parser' is deprecated and will "
912
+ "be removed in a future version. "
913
+ "Please use 'date_format' instead, or read your data in as 'object' dtype "
914
+ "and then call 'to_datetime'." ,
915
+ FutureWarning ,
906
916
stacklevel = find_stack_level (),
907
917
)
918
+ if date_parser is not None and date_format is not None :
919
+ raise TypeError ("Cannot use both 'date_parser' and 'date_format'" )
908
920
# locals() should never be modified
909
921
kwds = locals ().copy ()
910
922
del kwds ["filepath_or_buffer" ]
You can’t perform that action at this time.
0 commit comments