Skip to content

Resolved issue 62094 #62130

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Resolved issue 62094 #62130

wants to merge 1 commit into from

Conversation

saw1998
Copy link

@saw1998 saw1998 commented Aug 16, 2025

Using default frequency as difference between two TimeDeltas

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Using default frequency as difference between two TimeDeltas
@@ -509,7 +509,10 @@ def shift(self, periods: int = 1, freq=None) -> Self:
return self.copy()

if self.freq is None:
raise NullFrequencyError("Cannot shift with no freq")
if(len(self) > 1):
self.freq = self[1] - self[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t be modifying self.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants