Closed
Description
Location of the documentation
- https://pandas.pydata.org/docs/reference/api/pandas.to_datetime.html
- https://pandas.pydata.org/docs/dev/reference/api/pandas.to_datetime.html?highlight=to_datetime
Documentation problem
The to_datetime
method does something wildly different on strings or Series vs DataFrames. This caught me by surprise and I think it would help if the documentation reflected this more clearly.
Suggested fix for documentation
Something along the lines of:
For most datatypes given to the to_datetime
method it creates datetime objects out of strings. If to_datetime
is given a dataframe it does something quite different: it combines columns that contain year, month and day information into datetime objects.