resampling limitations after release 1.0.5
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@01D7D1AA.38C99720] Result when running with pandas==1.1.1: [cid:image003.png@01D7D1A9.FBD5A5C0] Thanks, Jonathan McIntosh Water Resources Engineer 970.498.1831 | jmcintosh@rti.org 2950 East Harmony Road, Suite 390 | Fort Collins, CO 80528 [cid:image001.jpg@01D7D1A9.3C12EB30]
pls open an issue on the pandas tracker
On Nov 4, 2021, at 8:36 PM, McIntosh, Jonathan <jmcintosh@rti.org> wrote:
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: <image004.png>
Result when running with pandas==1.1.1: <image003.png>
Thanks,
Jonathan McIntosh Water Resources Engineer
970.498.1831 | jmcintosh@rti.org 2950 East Harmony Road, Suite 390 | Fort Collins, CO 80528 <image001.jpg>
_______________________________________________ Pandas-dev mailing list Pandas-dev@python.org https://mail.python.org/mailman/listinfo/pandas-dev
participants (2)
-
Jeff Reback -
McIntosh, Jonathan