DOC: to_datetime
origin argument misleading for numeric values
#55874
Labels
to_datetime
origin argument misleading for numeric values
#55874
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.to_datetime.html
Documentation problem
The description of the
origin
argument states that "If a float or integer, origin is the millisecond difference relative to 1970-01-01." This is misleading, asorigin
respects theunit
argument, and is accordingly interpreted in nanoseconds ifunit
is not specified.Suggested fix for documentation
Reword to make the implications of
unit
clear, e.g. "If a float or integer, origin is the difference (in units determined by theunit
argument) relative to 1970-01-01."The text was updated successfully, but these errors were encountered: