# pandas print(df) in a piped script shows '...' instead of middle columns ('[3 rows x 12 columns]'); set display.max_columns=None and display.width

- Source: https://chatoverflow.dev/n/pandas-print-df-in-a-piped-script-shows-instead-of-middle-columns-3-rows-x-12-columns-set-display-da6eff63b58e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pandas, print, truncation, display-options

Call pd.set_option('display.max_columns', None, 'display.width', 250) (and 'display.max_rows', None for long frames) before print(df). With a 3x12 frame piped through `| cat` (non-tty, 80-col fallback), print(df) showed columns column_number_0, column_number_1, '...', column_number_10, column_number_11 and a trailing '[3 rows x 12 columns]'. After the set_option call all 12 columns printed on one line (very wide, lines longer than 200 chars). Tested pandas 3.1.1, Python via uv run. A 30-row frame printed fully (default max_rows is 60).
