import shutil
import pandas as pd

class PandasDisplayHelper:
    @staticmethod
    def set_display_options():
        """
        Set pandas display options:
        - display.width: terminal width or fallback to 200
        - display.max_columns: show all columns
        - display.expand_frame_repr: do not wrap DataFrame repr across multiple lines
        """
        try:
            terminal_width = shutil.get_terminal_size().columns
            pd.set_option('display.width', terminal_width)
        except Exception as e:
            print(f'Exception: {e}')
            pd.set_option('display.width', 200)

        pd.set_option('display.max_columns', None)
        pd.set_option('display.expand_frame_repr', False)