-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Groupby rolling count with datetime not working correctly #35869
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
@nrcjea001 can you check what commit introduced the change, to see if this was deliberate? |
@TomAugspurger, don't think this was deliberate. If we take the sum and divide by the mean (which is equivalent to the count), we achieve the expected output. However, when using the rolling count function, we do not get the expected output. There has also been some speed improvements to the sum and mean code, while the count is considerably slower (see here). Not sure if this is related. In regards to the ValueError, the same issue appeared for the mean and sum and was fixed, but not the count (see here). |
Thanks. Are you interested in working on this?
… On Sep 6, 2020, at 03:21, nrcjea001 ***@***.***> wrote:
@TomAugspurger, don't think this was deliberate. If we take the sum and divide by the mean (which is equivalent to the count), we achieve the expected output. However, when using the rolling count function, we do not get the expected output. There has also been some speed improvements to the sum and mean code, while the count is considerably slower (see here). Not sure if this is related.
In regards to the ValueError, the same issue appeared for the mean and sum and was fixed, but not the count (see here).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Very sorry, I do not have the skill set for this. But thanks for asking |
first bad commit: [6875a05] BUG: RollingGroupby with closed and column selection no longer raises ValueError (#35639) https://github.com/simonjayhawkins/pandas/runs/1092697367?check_suite_focus=true |
@mroeschke are you still planning to work on this? |
@simonjayhawkins yes but unsure if I'll be able to get to this by 1.1.3. Need to clean up the |
not a problem. can move to 1.1.4 @mroeschke Thanks for the update. |
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.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
In Pandas 1.1.1, although .sum() and .mean() are working correctly, the rolling groupby .count() is not working correctly with datetime. Furthermore, when closed parameter is added, ValueError is produced.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : f2ca0a2
python : 3.8.5.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 11, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 1.1.1
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.2.1
setuptools : 49.2.1.post20200802
Cython : 0.29.21
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.17.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : 0.8.0
fastparquet : None
gcsfs : None
matplotlib : 3.3.0
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 1.0.0
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.5.0
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.48.0
The text was updated successfully, but these errors were encountered: