alteryx / woodwork

Woodwork is a Python library that provides robust methods for managing and communicating data typing information.
https://woodwork.alteryx.com
BSD 3-Clause "New" or "Revised" License
145 stars 20 forks source link

`_infer_datetime_format()` is unable to deal with non-string input #1725

Closed christopherbunn closed 1 year ago

christopherbunn commented 1 year ago

The function _infer_datetime_format() in woodwork/utils.py utilizes pd.core.tools.datetimes.guess_datetime_format() internally, which requires the input to be a datetime string. However, there is no casting the input as a string and an error is thrown if the input is not a string (even if the input is castable).

This issue needs to be resolved as part of EvalML's pandas 2 update compatibility (https://github.com/alteryx/evalml/pull/4216) and is related to #1688