You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
""" return True if we have an equal len settable """
if (notlen(labels) ==1ornotnp.iterable(value) or
is_scalar(plane_indexer[0])):
returnFalse
item=labels[0]
index=self.obj[item].index
values_len=len(value)
# equal len list/ndarray
iflen(index) ==values_len:
returnTrue
eliflplane_indexer==values_len:
returnTrue
returnFalse
When the DataFrame.loc method uses boolean array selector in the backgroud, the variable lplane_indexer is not the same value as the number of True value in the array but the size of DataFrame. It didn't happen in a former version.
The text was updated successfully, but these errors were encountered:
fx-kirin
changed the title
length_of_indexer method is not support boolean array selector.
length_of_indexer method is not support boolean array indexer.
Mar 19, 2019
Code Sample
Problem description
pandas/pandas/core/indexing.py
Line 517 in db6993c
pandas/pandas/core/indexing.py
Lines 546 to 562 in db6993c
When the
DataFrame.loc
method uses boolean array selector in the backgroud, the variablelplane_indexer
is not the same value as the number of True value in the array but the size of DataFrame. It didn't happen in a former version.Expected Output
No error raises.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-46-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.3
pytest: 3.7.3
pip: 18.1
setuptools: 36.5.0.post20170921
Cython: 0.28.4
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: 1.1.5
lxml: None
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.10
pymysql: 0.9.3
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: