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

AmbiguousTimeError exception when resampling near DST change date #8744

Closed
akhilman opened this issue Nov 6, 2014 · 5 comments
Closed

AmbiguousTimeError exception when resampling near DST change date #8744

akhilman opened this issue Nov 6, 2014 · 5 comments
Labels
Bug Duplicate Report Duplicate issue or pull request Resample resample method Timezones Timezone data dtype
Milestone

Comments

@akhilman
Copy link

akhilman commented Nov 6, 2014

index = pd.to_datetime(pd.Series([
'2014-10-26 07:35:49',
'2014-10-26 07:45:08',
'2014-10-26 08:04:58'
]))

df = pd.DataFrame(np.arange(len(index)), index=index)
df = df.tz_localize('Asia/Krasnoyarsk', ambiguous='NaT')
df.resample('D')

AmbiguousTimeError: Cannot infer dst time from Timestamp('2014-10-26 01:00:00'), try using the 'ambiguous' argument

UTC offset changed from +8 to +7 at 2:00 local time.

@jreback jreback added Resample resample method Bug Timezones Timezone data dtype labels Nov 6, 2014
@jreback
Copy link
Contributor

jreback commented Nov 6, 2014

cc @rockg
cc @ischwabacher

We apparently have 4 open issues on almost the same exact thing. Can you guys looks thru and recommend dispositions for each of these (e.g. close as dupe of another, separate distinct issue).

All other things equal, we generally keep the oldest issue open.

#5172
#8744 (this one)
#8653
#5694

@rockg
Copy link
Contributor

rockg commented Nov 6, 2014

I think #5694 might be fixed. I don't get any NaNs like I used to and there was a commit to add timezones so the offsets work properly which fixed it. Nevertheless, we can start adding some tests for that. I did take a look at both #5172 and #5694 and have some comments in both. I remember reaching a place where I didn't know where to proceed, but I can take another crack at it. I think for starters we can move all these examples to the original. Clearly they all are related to resample and probably just different incarnations of the same thing at first glance...if we find they are substantially different we can open separate issues at that point. @ischwabacher, what do you think?

@jreback jreback added the Duplicate Report Duplicate issue or pull request label Nov 6, 2014
@jreback
Copy link
Contributor

jreback commented Nov 6, 2014

closing as dupe of #5172 for now

@jreback jreback closed this as completed Nov 6, 2014
@jreback jreback added Deprecate Functionality to remove in pandas and removed Deprecate Functionality to remove in pandas labels Nov 6, 2014
@jreback
Copy link
Contributor

jreback commented Nov 6, 2014

ok, think I fixed up all the issues and made #5172 the master issue

@akhilman
Copy link
Author

akhilman commented Nov 6, 2014

Thank you, I'll keep watching #5172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request Resample resample method Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants