Skip to content

DOC: to_datetime origin argument misleading for numeric values #55874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
sfc-gh-joshi opened this issue Nov 7, 2023 · 1 comment · Fixed by #56151
Closed
1 task done

DOC: to_datetime origin argument misleading for numeric values #55874

sfc-gh-joshi opened this issue Nov 7, 2023 · 1 comment · Fixed by #56151
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@sfc-gh-joshi
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location 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, as origin respects the unit argument, and is accordingly interpreted in nanoseconds if unit 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 the unit argument) relative to 1970-01-01."

@sfc-gh-joshi sfc-gh-joshi added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 7, 2023
@sfc-gh-joshi
Copy link
Author

(seems to be related to #54788)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant