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
PERF: shift() of boolean series gives drawdown by an order of magnitude with default filling np.NaN comparing with filling by bool like False #58465
Comments
I think this is expected since
|
I have expected boolean filling for boolean series by default as according the docs:
|
Do you see something that disagrees with the docs? If that is the case, please provide an example, the result you get, and the result you expect. |
Yes, according the docs if I have a boolean series, instead of NaN filling of missed values have to be boolean by False (as False is default boolean state)
|
but anyway, if no one met that before - it's not a problem and only my interpretation, and fill_value make a deal for somebody like me in such case. |
I do not believe the docs state this. Saying In any case, I do think it would improve the docs to read
A PR would be welcome to improve the documentation! |
Hi @rhshadrach, I tried to create a PR to update the documentation. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this issue exists on the latest version of pandas.
I have confirmed this issue exists on the main branch of pandas.
Reproducible Example
Installed Versions
INSTALLED VERSIONS
commit : d9cdd2e
python : 3.11.4.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19045
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1251
pandas : 2.2.2
numpy : 1.25.1
pytz : 2023.3
dateutil : 2.8.2
setuptools : 65.5.0
pip : 24.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.14.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.2
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : 2023.10.0
gcsfs : None
matplotlib : 3.7.2
numba : 0.58.1
numexpr : None
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 13.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
Prior Performance
The text was updated successfully, but these errors were encountered: