Skip to content

DOC: to_datetime origin argument misleading for numeric values #55874

Closed
@sfc-gh-joshi

Description

@sfc-gh-joshi

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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions