Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DOC/ERR: update error message / doc-string for to_datetime with non-convertible object and unit kw #14350
A small, complete example of the issue
This may have changed, but is is actually in some way correct. As stated in the docstring (but maybe not clear enough), the
It is not meant to the precision of the resulting datetime, as this is always 'ns' whathever the input. So since the keyword would not have any effect when parsing a datetime object, I think it is correct to raise an error.