Skip to content

Timestamp.as_unit #859

Closed
Closed
@amgcc

Description

@amgcc

Describe the bug
Method as_unit not defined on Timestamp

To Reproduce

  1. Provide a minimal runnable pandas example that is not properly checked by the stubs.
    pd.Timestamp(2023, 1, 1).as_unit("ns")
  2. Indicate which type checker you are using (mypy or pyright).
    mypy
  3. Show the error message received from that type checker while checking your example.
    error: "Timestamp" has no attribute "as_unit" [attr-defined]

Please complete the following information:

  • OS: Linux
  • OS Fedora 7
  • python version: 3.11
  • version of type checker: 1.8
  • version of installed pandas-stubs=2.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions