This answer is a variation of the previous answer from lucidyan . This makes the code more readable, avoiding the use of set_option .
After importing pandas, as an alternative to using the context manager, set these parameters to display large data frames:
def set_pandas_display_options() -> None: display = pd.options.display display.max_columns = 1000 display.max_rows = 1000 display.max_colwidth = 199 display.width = None
After that, you can use display(df) or just df when using a laptop, otherwise print(df) .
Acumenus Sep 20 '18 at 20:23 2018-09-20 20:23
source share