Download our e-book of Introduction To Python
Divya Bhat
3 years ago
import pandas as pd
print pd.get_option("display.max_rows")
60
import pandas as pd
print pd.get_option("display.max_columns")
20
Live Demo
import pandas as pd
pd.set_option("display.max_rows",80)
print pd.get_option("display.max_rows")
100
import pandas as pd
pd.set_option("display.max_columns",30)
print pd.get_option("display.max_columns")
50
import pandas as pd
pd.reset_option("display.max_rows")
print pd.get_option("display.max_rows")
60
import pandas as pd
pd.describe_option("display.max_rows")
display.max_rows : int
If max_rows is exceeded, switch to truncate view. Depending on
'large_repr', objects are either centrally truncated or printed as
a summary view. 'none' value means unlimited.
In case python/IPython is running in a terminal and `large_repr`
equals 'truncate' this can be set to 0 and pandas will auto-detect
the height of the terminal and print a truncated object which fits
the screen height. The IPython notebook, IPython qtconsole, or
IDLE do not run in a terminal and hence it is not possible to do
correct auto-detection.
[default: 60] [currently: 60]
import pandas as pd
with pd.option_context("display.max_rows",35):
print(pd.get_option("display.max_rows"))
print(pd.get_option("display.max_rows"))
35
35