Skip to content

Canonicalize Offset Names #12378

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
cancan101 opened this issue Feb 18, 2016 · 1 comment
Closed

Canonicalize Offset Names #12378

cancan101 opened this issue Feb 18, 2016 · 1 comment
Labels
Frequency DateOffsets

Comments

@cancan101
Copy link
Contributor

Reposted from: https://github.com/pydata/pandas/pull/5148/files#r10454189

Currently you get the following behavior because there is not a canonicalized offset name:

In [10]: get_offset("QS-JAN") == get_offset("QS")
Out[10]: True

In [29]: get_offset("QS-JAN").name == get_offset("QS").name
Out[29]: False

n [31]: get_offset("QS-JAN") is get_offset("QS")
Out[31]: False
@jreback jreback added the Frequency DateOffsets label Feb 18, 2016
@jreback
Copy link
Contributor

jreback commented Feb 18, 2016

on master

In [35]: get_offset("QS-JAN") == get_offset("QS")
Out[35]: True

In [36]: get_offset("QS-JAN").name == get_offset("QS").name
Out[36]: True

In [37]: get_offset("QS-JAN") is get_offset("QS")
Out[37]: False

this looks right. These are now new objects, not the same object, so they compare equal, but not identical. see #11192

@jreback jreback closed this as completed Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frequency DateOffsets
Projects
None yet
Development

No branches or pull requests

2 participants