Home > Blockchain >  AttributeError: 'function' object has no attribute 'max_columns'
AttributeError: 'function' object has no attribute 'max_columns'

Time:03-10

May I know what this error is about? What is not right here? I've followed the instruction here enter image description here

CodePudding user response:

Since you seem to be in a jupyter notebook, display is a function from IPython.core. You don't seem to have specified another variable called display, so you're looking for the attribute max_columns of this function. But functions don't have that attribute. Assign what you want the max_columns of to another variable and try again.

I also agree that you should provide a code example. But from looking at the link, you're trying to run as a function what is supposed to be an option for pandas. From the link: pd.set_option('display.max_columns', None).

CodePudding user response:

Error is resolved after correcting the second last statement to

pd.options.display.max_columns
# Set it to None to display all columns in the dataframe
pd.set_option('display.max_columns', None)
  • Related