Spyder: Spyder Variable explorer crashes when double clicking a 2 line DataFrame

Created on 30 Dec 2016  路  4Comments  路  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

  1. place a csv version of the attached fuct.csv on c drive
  2. Run the below:

    import pandas as pd
    dfraw = pd.read_csv(r"C:\fuct.csv")
    
  3. go to Variable explorer and double click to view dfraw

I attach the crash message in Spyder

spyder_crash

The file can be saved as csv (the input to dataframe)
fuct.txt

What is the expected output? What do you see instead?

Please provide any additional information below

Version and main components

  • Spyder Version: 3.0.2
  • Python Version: 2.7.12
  • Qt Versions: 5.6.0, PyQt5 5
    fuct.txt

.6 on Windows

Dependencies

pyflakes >=0.5.0 :  1.3.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
pandas >=0.13.1  :  0.18.1 (OK)
numpy >=1.7      :  1.11.1 (OK)
sphinx >=0.6.6   :  1.4.6 (OK)
rope >=0.9.4     :  0.9.4 (OK)
jedi >=0.8.1     :  0.9.0 (OK)
matplotlib >=1.0 :  1.5.3 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.5.4 (OK)

Variable Explorer Completed Bug

All 4 comments

@dalthviz, please take a look at this one.

@ccordoba12 @dalthviz happy new year guys. So what exactly is the fix ? many thanks

Hi @shahroozaz , happy new year to you too, for now you can try to use the encoding parameter in read_csv like this:

import pandas as pd
dfraw = pd.read_csv(r"C:\fuct.csv", encoding="utf-8-sig") 

We are working on a way to make things work without the parameter, so for that we will start identifying the proper encoding for each part of the header :)

@dalthviz thank you guys 馃憤

Was this page helpful?
0 / 5 - 0 ratings