Skip to content

NonExistentTimeError Trying to resample series. #23873

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
jdavidagudelo opened this issue Nov 23, 2018 · 1 comment
Closed

NonExistentTimeError Trying to resample series. #23873

jdavidagudelo opened this issue Nov 23, 2018 · 1 comment

Comments

@jdavidagudelo
Copy link

Code Sample, a copy-pastable example if possible

# Your code here

user_timezone = 'America/Bogota'
new_series = pandas.Series([1, 2], index=pandas.to_datetime([1, 1542997018451], unit='ms'))
new_series.index = new_series.index.tz_localize( 'UTC', ambiguous='infer').tz_convert(user_timezone)
new_series.resample('1D').count()

Problem description

When I execute the previous python code it raises an exception saying NonExistentTimeError: 1992-05-03 00:00:00.

Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on master here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

Expected Output

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]

@mroeschke
Copy link
Member

This looks like a duplicate of #23742, and this will be fixed in the next release.

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

No branches or pull requests

2 participants