Display output on pandas not working?

198 views
Skip to first unread message

Zac Smith

unread,
Jun 7, 2018, 12:54:23 AM6/7/18
to spyder
I'm still learning.  I'm trying to execute this simple script and get a string of errors.  I'm feeling like I don't have something installed.  Thanks for any help?

import numpy as np
import pandas as pd

from numpy.random import randn
df=pd.DataFrame(randn(5,4),['A','B','C','D','E'],['W','X','Y','Z'])

print(df)



Error looks like this:
runfile('C:/Users/Jeff/Documents/Python/untitled0.py', wdir='C:/Users/Jeff/Documents/Python')
Traceback (most recent call last):

  File "<ipython-input-44-9c6f0065b2dd>", line 1, in <module>
    runfile('C:/Users/Jeff/Documents/Python/untitled0.py', wdir='C:/Users/Jeff/Documents/Python')

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Jeff/Documents/Python/untitled0.py", line 16, in <module>
    print(df)

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\frame.py", line 624, in __unicode__

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\frame.py", line 612, in _info_repr
    max_rows = 1

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\config.py", line 227, in __call__
    return self.__func__(*args, **kwds)

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\config.py", line 97, in _get_option
    key = _get_single_key(pat, silent)

  File "C:\Users\Jeff\Anaconda3\lib\site-packages\pandas\core\config.py", line 83, in _get_single_key
    raise OptionError('No such keys(s): {pat!r}'.format(pat=pat))

OptionError: "No such keys(s): 'display.large_repr'"

Reply all
Reply to author
Forward
0 new messages