Skip to content

ENH: to_offset "year"/"quarter"/"month"/"day"/...? #34586

Open
@jbrockmendel

Description

@jbrockmendel

In the process of untangling Resolution/FreqGroup/PeriodDtype/Offsets im finding it would be helpful if to_offset("year") behaved like to_offset("Y") etc. But apparently these are specifically deprecated.

This test was introduced here (commit but no PR) and is listed as closing #11854 and #12540, but neither of those really make it clear to me why we wouldn't allow these.

Any objection to having to_offset recognize these strings?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions