We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
In [1]: import pandas as pd ...: import numpy as np ...: arr = np.zeros((5,5)) ...: df = pd.DataFrame(arr) ...: df[3] = 1 ...: df[3] = df[3].astype(np.float32) ...: df.rolling(2, axis=1).max() Out[1]: 0 1 2 4 0 NaN 0.0 0.0 0.0 1 NaN 0.0 0.0 0.0 2 NaN 0.0 0.0 0.0 3 NaN 0.0 0.0 0.0 4 NaN 0.0 0.0 0.0 In [2]: df[3] = df[3].astype(np.float64) ...: df.rolling(2, axis=1).max() Out[2]: 0 1 2 3 4 0 NaN 0.0 0.0 1.0 1.0 1 NaN 0.0 0.0 1.0 1.0 2 NaN 0.0 0.0 1.0 1.0 3 NaN 0.0 0.0 1.0 1.0 4 NaN 0.0 0.0 1.0 1.0
It seems that the column with type float32 is skipped by the operation rolling.
pd.show_versions()
INSTALLED VERSIONS
commit : 5f648bf python : 3.8.10.final.0 python-bits : 64 OS : Linux OS-release : 4.15.0-123-generic Version : #126-Ubuntu SMP Wed Oct 21 09:40:11 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8
pandas : 1.3.2 numpy : 1.20.3 pytz : 2021.1 dateutil : 2.8.2 pip : 21.2.4 setuptools : 57.4.0 Cython : 0.29.24 pytest : 6.2.4 hypothesis : None sphinx : 4.1.2 blosc : None feather : None xlsxwriter : 3.0.1 lxml.etree : 4.6.3 html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 2.11.3 IPython : 7.26.0 pandas_datareader: None bs4 : 4.9.3 bottleneck : 1.3.2 fsspec : 2021.07.0 fastparquet : None gcsfs : None matplotlib : 3.4.3 numexpr : 2.7.3 odfpy : None openpyxl : 3.0.7 pandas_gbq : None pyarrow : None pyxlsb : None s3fs : None scipy : 1.7.1 sqlalchemy : 1.4.23 tables : 3.6.1 tabulate : None xarray : None xlrd : 2.0.1 xlwt : 1.3.0 numba : 0.53.1
The text was updated successfully, but these errors were encountered:
Duplicate of #42452
Sorry, something went wrong.
No branches or pull requests
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
It seems that the column with type float32 is skipped by the operation rolling.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 5f648bf
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-123-generic
Version : #126-Ubuntu SMP Wed Oct 21 09:40:11 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.4
hypothesis : None
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.26.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.07.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : 1.4.23
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
The text was updated successfully, but these errors were encountered: