-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
REGR: ValueError: setting an array element with a sequence. when assigning an array.array using .loc #46268
Comments
I get an error on master. Could you please try on master too?
|
Hi, thanks for the quick reply. I just tried out with master (version '1.5.0.dev0+501.g0453fdf4b') and it is still the same behaviour. In the jupyter notebook the cell seems to be busy and no error message is printed out. Only when looking at the console where the jupyter notebook is running I see the following error:
So the Thanks for your help! |
Thanks @pat-schmitt for the report
looks like it was working in 1.3.5 so labelling as a regression for now pending further investigation. |
moving to 1.4.4 |
BTW, the fact that a notebook is hanging and you see that long traceback in IPython, that was a bug in IPython that should be fixed in the latest version (ipython/ipython#12467) That still leaves the regression or behaviour change in pandas. I started investigating this and have an PR at #48057 |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
If the Example above is running in a jupyter notebook, the notebook gets stuck and no error message is shown. The error message only appears in the console where the jupyter notebook is running. From the notebook inside it looks like the cell is still computing. The Example also includes two solutions to it, but a decent error message still would be nice.
Expected Behavior
It would be great if the error message would be displayed directly in the notebook or the provided datatype should be supported again.
As background info: this datatype you will get when working with geopandas (https://geopandas.org/en/stable/index.html) and shaply (https://shapely.readthedocs.io/en/stable/manual.html) and you want to extract the centre coordinates of a geometry. Further, I think this was supported in a previous pandas version as the error just appeared on an older notebook (if wanted I could try to find out up to which version or you decide it is not supported anymore then I will let shaply and geopandas know).
Installed Versions
pandas : 1.4.1
numpy : 1.22.3
pytz : 2021.3
dateutil : 2.8.2
pip : 22.0.4
setuptools : 59.8.0
Cython : 0.29.28
pytest : 7.0.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.3
IPython : 8.1.1
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : 2022.02.0
gcsfs : None
matplotlib : 3.5.1
numba : None
numexpr : 2.8.0
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.8.0
sqlalchemy : None
tables : 3.7.0
tabulate : None
xarray : 2022.3.0
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: