Skip to content

BUG: offsets.apply may return datetime #7502

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

Merged
merged 1 commit into from
Jun 21, 2014
Merged

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 18, 2014

Currently, offsets.appy, rollforward and rollback returns Timestamp if argument is Timestamp or np.datetime64.

If input is datetime, these functions return datetime or Timestamp inconsistently depending on internal process. It may better to always return Timestanp?

Affected Offsets

  • 'pandas.tseries.offsets.Day'
  • 'pandas.tseries.offsets.MonthBegin'
  • 'pandas.tseries.offsets.FY5253Quarter'
  • 'pandas.tseries.offsets.FY5253'
  • 'pandas.tseries.offsets.Week'
  • 'pandas.tseries.offsets.WeekOfMonth'
  • 'pandas.tseries.offsets.Easter'
  • 'pandas.tseries.offsets.Hour'
  • 'pandas.tseries.offsets.Minute'
  • 'pandas.tseries.offsets.Second'
  • 'pandas.tseries.offsets.Milli'
  • 'pandas.tseries.offsets.Micro'

@jreback
Copy link
Contributor

jreback commented Jun 18, 2014

these should always return Timestamp, this is checked, but guess not for other types of input...

@jreback jreback added this to the 0.14.1 milestone Jun 18, 2014
jreback added a commit that referenced this pull request Jun 21, 2014
BUG: offsets.apply may return datetime
@jreback jreback merged commit fa68e4f into pandas-dev:master Jun 21, 2014
@sinhrks sinhrks deleted the offsetret branch June 21, 2014 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants