Closed
Description
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
import pandas as pd
from datetime import datetime, timedelta
s1 = pd.Series([138, 2377900603251717750], index=pd.Index([datetime(year=1970, month=1, day=1), datetime(year=1970, month=1, day=1)+timedelta(microseconds=1)]))
s2 = s1.rolling("1D").sum()
print(s2.sum() >= s1.sum())
Problem description
The sum of the rolling window should be higher or equal to the original series because only positive values are in it. However, 'False' is printed.
Expected Output
True
Output of pd.show_versions()
INSTALLED VERSIONS
------------------
commit : 7d32926
python : 3.7.10.final.0
python-bits : 64
OS : Darwin
OS-release : 20.3.0
Version : Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.2.2
numpy : 1.19.4
pytz : 2020.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : 6.2.2
hypothesis : 6.3.1
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.20.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : None
odfpy : None
openpyxl : 3.0.6
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
phofl commentedon Feb 26, 2021
This is probably because this is internally cast to float, because the cython implementation expects floats.
This is probably a duplicate of #11446
phofl commentedon Feb 27, 2021
closing as duplicate