-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: 1.3.0rc behavior change with concatenating boolean and numeric columns #42092
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
the result is correct; you should be doing an |
Indeed, there was no release note with the PR that introduced this change. @jbrockmendel first bad commit: [4554635] REF: remove DatetimeBlock, TimeDeltaBlock (#40614) will reopen for now.
This change looks unintentional, we should add something to the release notes in the API breaking section and probably needs some additional tests for this new behavior (or revert to existing behavior till 2.0) |
@jbrockmendel thoughts here? |
Yah, AFAICT it was caused by adding a |
@jbrockmendel will you get a chance to fix for 1.3.1? (scheduled for end of next week) |
i think so, yes |
#42548) Co-authored-by: jbrockmendel <[email protected]>
…andas-dev#42541)" This reverts commit 80a72c1.
Thanks @jbrockmendel |
we also need #42576 to get the analogous ArrayManager behavior fixed |
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
Problem description
Previously, the
concat
call would produce a series with dtypeint64
, converting the bools to 1s and 0s. Now, all the values are maintained, so the dtype isobject
.Expected Output
I'm not sure if this behavior change is expected or not, but I didn't see anything in the release notes that made me think it was expected, so I'd expect the result to allow
assert new_df[0].dtype == 'int64'
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 2dd9e9b
python : 3.8.2.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.0rc1
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.2
setuptools : 41.2.0
Cython : None
pytest : 6.0.1
hypothesis : None
sphinx : 3.2.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.06.0
fastparquet : 0.5.0
gcsfs : None
matplotlib : 3.2.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 4.0.1
pyxlsb : None
s3fs : None
scipy : 1.6.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.53.1
The text was updated successfully, but these errors were encountered: