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
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
# Happens in Jupyterimportpandasaspddf=pd.DataFrame(range(5))
df.sort_values(__placecursorhereandpressShift+TabonJupyter, thencheckterminalforerrors__)
Issue Description
Shift+Tab (code tooltip in Jupyter) works alright, but not with pandas.DataFrame methods.
File "[...]/miniconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 412, in dispatch_shell
await result
File "[...]/miniconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 809, in inspect_request
reply_content = self.do_inspect(
^^^^^^^^^^^^^^^^
File "[...]/miniconda3/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 555, in do_inspect
bundle = self.shell.object_inspect_mime(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/miniconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 1838, in object_inspect_mime
if self.sphinxify_docstring
^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/miniconda3/lib/python3.11/site-packages/IPython/core/oinspect.py", line 738, in _get_info
"""Retrieve an info dict and format it.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/miniconda3/lib/python3.11/site-packages/IPython/core/oinspect.py", line 838, in info
An object info dict with known fields from `info_fields`. Keys are
File "[...]/miniconda3/lib/python3.11/site-packages/pandas-2.0.3-py3.11-linux-x86_64.egg/pandas/core/generic.py", line 1466, in __nonzero__
raise ValueError(
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Expected Behavior
We should be able to see tooltip opening in Jupyter
Installed Versions
INSTALLED VERSIONS
commit : 0f43794
python : 3.11.4.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-76-generic
Version : #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
I was in doubt whether to raise the issue here or in the ipython repo. But the error is being raised from method __nonzero__() inside pandas/core/generic.py. Is it not related do Pandas itself?
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
Shift+Tab (code tooltip in Jupyter) works alright, but not with
pandas.DataFrame
methods.Expected Behavior
We should be able to see tooltip opening in Jupyter
Installed Versions
INSTALLED VERSIONS
commit : 0f43794
python : 3.11.4.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-76-generic
Version : #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.0.3
numpy : 1.25.1
pytz : 2022.7
dateutil : 2.8.2
setuptools : 67.8.0
pip : 23.1.2
Cython : 3.0.0
pytest : None
hypothesis : None
sphinx : 5.0.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.12.2
pandas_datareader: None
bs4 : 4.12.2
bottleneck : None
brotli :
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.7.2
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.11.1
snappy : None
sqlalchemy : None
tables : 3.8.0
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : 0.19.0
tzdata : 2023.3
qtpy : 2.2.0
pyqt5 : None
The text was updated successfully, but these errors were encountered: