question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Viewing a dataframe after installing pandas crashes

See original GitHub issue

Description

What steps will reproduce the problem?

  1. Install Spyder, don’t install pandas.
  2. Go to view a pandas dataframe (e.g. if your project python executable is in a venv)
  3. Get an error that pandas isn’t installed.
  4. Realize you haven’t got pandas installed globally alongside Spyder, so install it with pip.
  5. Go to view the pandas dataframe again.
  6. See this crash.

Traceback

  File "/home/jarrad/.local/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/tree_model.py", line 267, in fetchMore
    parent_item.obj_path)
  File "/home/jarrad/.local/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/tree_model.py", line 322, in _fetchObjectChildren
    for attr_name, attr_value in sorted(inspect.getmembers(obj)):
  File "/usr/lib/python3.7/inspect.py", line 341, in getmembers
    value = getattr(object, key)
  File "/home/jarrad/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 391, in _constructor_expanddim
    raise NotImplementedError("Not supported for DataFrames!")
NotImplementedError: Not supported for DataFrames!
Traceback (most recent call last):
  File "/home/jarrad/.local/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/tree_model.py", line 267, in fetchMore
    parent_item.obj_path)
  File "/home/jarrad/.local/lib/python3.7/site-packages/spyder/plugins/variableexplorer/widgets/objectexplorer/tree_model.py", line 322, in _fetchObjectChildren
    for attr_name, attr_value in sorted(inspect.getmembers(obj)):
  File "/usr/lib/python3.7/inspect.py", line 341, in getmembers
    value = getattr(object, key)
  File "/home/jarrad/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 391, in _constructor_expanddim
    raise NotImplementedError("Not supported for DataFrames!")
NotImplementedError: Not supported for DataFrames!

Versions

  • Spyder version: 4.0.0b4
  • Python version: 3.7.3
  • Qt version: 5.12.2
  • PyQt5 version: 5.12.1
  • Operating System: Linux 5.0.0-20-generic

Dependencies

pygments >=2.0    :  2.3.1 (OK)
qdarkstyle >=2.6.4:  2.7 (OK)
sphinx >=0.6.6    :  2.1.2 (OK)
psutil >=0.3      :  5.5.1 (OK)
pyls >=0.27.0     :  v0.28.1 (OK)
nbconvert >=4.0   :  5.4.0 (OK)
pandas >=0.13.1   :  None (OK)
numpy >=1.7       :  1.16.2 (OK)
sympy >=0.7.3     :  None (NOK)
cython >=0.21     :  None (NOK)
qtconsole >=4.5.2 :  4.5.2 (OK)
IPython >=4.0     :  5.8.0 (OK)
matplotlib >=2.0.0:  3.0.2 (OK)
pylint >=0.25     :  2.2.2 (OK)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Aug 9, 2019

Ok, please test it and if this is fixed, please remove the Milestone and close this one.

0reactions
dalthvizcommented, Aug 9, 2019

This is fixed by PR #9967

Read more comments on GitHub >

github_iconTop Results From Across the Web

crash when open pandas dataframe from Variable Explorer
I samply read a dataframe from an csv file (df = pd.readcsv('file. · when double clike variable df at Variable Explorer, to check...
Read more >
Import pandas exits python console - Stack Overflow
pip install pandas. It completed successfully. In my python console If I run import pandas as pd. python exits without any error message....
Read more >
Python console crashes when trying to view a pandas v 0.24.1 ...
Python console crashes when trying to view a pandas v 0.24.1 DataFrame with a Int64 ... I am using pycharm in Ubuntu 18.04,...
Read more >
10 minutes to pandas — pandas 1.5.2 documentation
Use DataFrame.head() and DataFrame.tail() to view the top and bottom rows of the ... While standard Python / NumPy expressions for selecting and...
Read more >
Convert PySpark DataFrame to Pandas - Spark by {Examples}
After processing data in PySpark we would need to convert it back to Pandas DataFrame for a further procession with Machine Learning application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found