Skip to content
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

BUG: pandas.tseries.offsets.DateOffset behavior changes #45890

Closed
1 of 3 tasks
iajoiner opened this issue Feb 9, 2022 · 2 comments · Fixed by #45909
Closed
1 of 3 tasks

BUG: pandas.tseries.offsets.DateOffset behavior changes #45890

iajoiner opened this issue Feb 9, 2022 · 2 comments · Fixed by #45909
Labels
Bug Frequency DateOffsets Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@iajoiner
Copy link
Contributor

iajoiner commented Feb 9, 2022

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas as pd

s = pd.Series(pd.to_datetime('2022-02-04'))
s = s + pd.DateOffset(1)
print(s)

Issue Description

This code snippet produces a series with a date. In Pandas 1.3.5 the date is 2022-02-05. On the other hand in Pandas 1.4.0 the date is abruptly changed to 2022-02-04 which means a API breaking change which is against the Pandas version policy has happened.

Expected Behavior

This code snippet should produce a series with the date is 2022-02-05.

Installed Versions

1.4.0

@iajoiner iajoiner added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 9, 2022
@iajoiner
Copy link
Contributor Author

iajoiner commented Feb 9, 2022

I'm basically reopening #45643. As an open source developer who has a PR here I think this issue needs to be addressed one way or another.

@iajoiner iajoiner changed the title BUG: pandas.tseries.offsets.DateOffset behaviorial changes BUG: pandas.tseries.offsets.DateOffset behavior changes Feb 9, 2022
simonjayhawkins added a commit to simonjayhawkins/pandas that referenced this issue Feb 10, 2022
@simonjayhawkins simonjayhawkins added Frequency DateOffsets Regression Functionality that used to work in a prior pandas version labels Feb 10, 2022
@simonjayhawkins simonjayhawkins added this to the 1.4.1 milestone Feb 10, 2022
@simonjayhawkins simonjayhawkins removed the Needs Triage Issue that has not been reviewed by a pandas team member label Feb 10, 2022
@simonjayhawkins
Copy link
Member

first bad commit: [cd5a124] FIX BUG: Timestamp add/sub DateOffset with nanoseconds lost. (#43968)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frequency DateOffsets Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants