[Pandas-dev] resampling limitations after release 1.0.5
McIntosh, Jonathan
jmcintosh at rti.org
Thu Nov 4 20:35:39 EDT 2021
Hello,
I would like to report an issue that may or may not already be known, but that has been a bug that has prevented our project from progressing to more recent releases of pandas. We are working with datasets that extend out past the maximum timestamp date of 2262-04-11, so we generally use period ranges rather than datetime ranges. However, starting with release 1.1.0, the resample functionality no longer works with period ranges that extend past 2262-04-11. The screenshots below show an example of this phenomenon. Would it be possible to restore the resampling functionality for period ranges that extend past 2262-04-11 in future releases?
Example Code Snippet:
import pandas as ps
from datetime import datetime
print(ps.__version__)
rng = ps.period_range(datetime(2000, 1, 1, 0, 0), datetime(2300, 1, 1, 0, 0), freq="1D")
df = ps.DataFrame(index = rng, data = [i+1 for i in range(0,len(rng))])
resample_df = df.resample("6H").interpolate()
print(resample_df.head(10))
Result when running with pandas==1.0.5:
[cid:image004.png at 01D7D1AA.38C99720]
Result when running with pandas==1.1.1:
[cid:image003.png at 01D7D1A9.FBD5A5C0]
Thanks,
Jonathan McIntosh
Water Resources Engineer
970.498.1831 | jmcintosh at rti.org
2950 East Harmony Road, Suite 390 | Fort Collins, CO 80528
[cid:image001.jpg at 01D7D1A9.3C12EB30]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20211105/3cf650eb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3746 bytes
Desc: image001.jpg
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20211105/3cf650eb/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 5495 bytes
Desc: image003.png
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20211105/3cf650eb/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 4613 bytes
Desc: image004.png
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20211105/3cf650eb/attachment-0003.png>
More information about the Pandas-dev
mailing list