-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Resample upsampling return NaNs #9528
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
Comments
I don't think this is a bug per se, rather a convention / api issue. IIRC (and i'll have to look further), it is actually reindexing here. (that's why the stamps that match with your original have values, but the others don't). Doesn't seem very useful though.
|
what would your expectation be for the result using the input of |
I would expect the output[8] that you printed (thank you for the how="mean" tip). Taking for instance a smaller input set:
When trying to divide in 5 parts, we have only 4... :
I would expect an extra line with a 2 or a NaN like this:
The example taken by jreback is a particular case, since it is rounded at 00:09:00 minutes, that is why there is the correct number of row that appears |
So the That said, there are a LOT of options for resample.
|
Just remembered for the first example, this requires upsampling so fill_method applies.
|
|
Pandas resample bugs when upsampling a time serie with same size splits :
For instance, I have a time serie of size 10:
print(ts)
When trying to resample in N > 10 parts it doesn't work:
print(tsNew)
Note: here is my versions:
pd.show_versions()
Thank you for your help
The text was updated successfully, but these errors were encountered: