BUG: Regression in 1.3.0: Exception when setting arrays as cell values · Issue #43422 · pandas-dev/pandas (original) (raw)
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of pandas (yes, on version 1.3.2).
- (optional) I have confirmed this bug exists on the master branch of pandas.
The following works fine on 1.2.5 and now fails (starting with 1.3.0). I waited for it to be fixed by 1.3.1/1.3.2 but it seems like this one went unnoticed until now.
Code Sample, a copy-pastable example
from pandas import DataFrame from numpy import zeros
(Leaving out the dtype doesn't change things)
frame = DataFrame(columns=["x", "P"], dtype=object) data = {"x": zeros((2, )), "P": zeros((2, 2))}
frame.append(data, ignore_index=True) frame.loc[0] = data
Problem description
No exception, just the inserted data.
Expected Output
None.
Output of pd.show_versions()
INSTALLED VERSIONS
commit : 5f648bf
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-81-generic
Version : #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021
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.21.0
pytz : 2021.1
dateutil : 2.8.1
pip : 20.0.2
setuptools : 57.0.0
Cython : None
pytest : 6.2.5
hypothesis : 6.17.4
sphinx : 4.0.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None