Can't pd.options.display.max_columns = 0 by default?
See original GitHub issuepd.options.display.max_columns
is 20 by default, but when running in a terminal this value could be auto-detected by setting it to 0. I know that this setting can be customized, but for the average user it would be much more convenient if there was no extra step involved. Is there a way to detect if pandas is running in a terminal (where autodetection works)? If so, the value should be set to 0. Otherwise, for example in Jupyter notebooks, it could remain to be 20.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Options and settings — pandas 1.5.2 documentation
display.max_colwidth sets the maximum width of columns. Cells of this length or longer will be truncated with an ellipsis. >>>
Read more >How do I expand the output display to see more columns of a ...
You can change the options for the Pandas max_columns feature as follows: import pandas as pd pd.options.display.max_columns = 10 · Like that, you...
Read more >6 Pandas Display Options You Should Memorise
By default, Pandas only display content in a cell with a maximum width of 50. That is, a cell with more than 50...
Read more >Python Pandas - Options and Customization - Tutorialspoint
display.max_columns. Displays the default number of value. Interpreter reads this value and displays the rows with this value as upper limit to display....
Read more >pandas: Get and set options for display, data behavior, etc.
pandas: Get and set options for display, data behavior, etc. · Get and set option values with attribute: options · Print the description...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I usually set the max columns to 0 in my IPython init. I think it would be ok to change the default.
Do we still run into issues where we can’t reliably detect the terminal width, or have those all been fixed?
Regarding the detection of the terminal width, I think it doesn’t work in PyCharm’s integrated terminal. However, the default of 80 is a reasonable value in this case.