TTL
TTL

Reputation: 81

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

So I have been trying to figure this out but my pandas 'display.height' option is not working and comes up with OptionError: "No such keys(s): 'display.height'". Here is what I have done.

import pandas as pd
pd.set_option('display.height', 1000)
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)

The code returns the following error:

C:\Anaconda3\lib\site-packages\pandas\core\config.py in __call__(self, *args, **kwds)
    225 
    226     def __call__(self, *args, **kwds):
--> 227         return self.__func__(*args, **kwds)
    228 
    229     @property

C:\Anaconda3\lib\site-packages\pandas\core\config.py in _set_option(*args, **kwargs)
    117 
    118     for k, v in zip(args[::2], args[1::2]):
--> 119         key = _get_single_key(k, silent)
    120 
    121         o = _get_registered_option(key)

C:\Anaconda3\lib\site-packages\pandas\core\config.py in _get_single_key(pat, silent)
     81         if not silent:
     82             _warn_if_deprecated(pat)
---> 83         raise OptionError('No such keys(s): {pat!r}'.format(pat=pat))
     84     if len(keys) > 1:
     85         raise OptionError('Pattern matched multiple keys')

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

Do you have any suggestions how to correct this?

Upvotes: 8

Views: 7886

Answers (1)

Brian
Brian

Reputation: 13573

According to pandas 0.15 document, you should use display.max_rows to replace display.height.

display.height : int

Deprecated. [default: 60] [currently: 15] (Deprecated, use display.max_rows instead.)

Upvotes: 2

Related Questions