Issue

Assigning to a Panel with two vector indexers and one scalar indexer produces unexpected behaviour: the vector indexers are zipped together, rather than the Cartesian product.

A small, complete example of the issue

p=pd.Panel(0,[0,1],[0,1],[0,1])
p.loc[[0,1],[0,1],[0]]=21
p.loc[[0,1],[0,1],0]=42
p.loc[[0,1],[0,1],0]

Actual Output

    0     1
0  42   21
1  21   42

Expected Output

     0   1
0  42  42
1  42  42

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: 06b35db1d88e75a9e3f183b58678589cf7715381 python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.1.3-101.fc21.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 pandas: 0.19.0+69.g06b35db nose: 1.3.7 pip: 8.1.2 setuptools: 27.2.0 Cython: 0.24.1 numpy: 1.11.1 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.4.6 patsy: 0.4.1 dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: 1.1.0 tables: 3.2.3.1 numexpr: 2.6.1 matplotlib: 1.5.3 openpyxl: 2.3.2 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.13 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.42.0 pandas_datareader: None

Comment From: AdamGleave

This appears to be a problem in indexing.py:maybe_convert_ix. The Cartesian product is not taken if any element in the index is not a list.

Comment From: jorisvandenbossche

@AdamGleave We would certainly welcome a bug fix if you can make a PR.

But note that we are planning to deprecate Panels eventually, see https://github.com/pandas-dev/pandas/issues/13563

Comment From: jreback

closing as Panels are deprecated.