Faller
Faller

Reputation: 1698

Pycharm: set terminal size

I'm trying to set the terminal size of the pycharm terminal so pandas will wrap like I want to. I know that I can do

import pandas as pd
pd.set_option('display.max_columns', 10)
pd.set_option('display.width', 500)

for each thing I run. But pandas detects the terminal size and when I run

pd.core.series.get_terminal_size()
Out[94]: os.terminal_size(columns=80, lines=24)

Is there a way to make the terminal size larger so pandas will auto-detect this?

Upvotes: 3

Views: 1145

Answers (1)

Ralf
Ralf

Reputation: 16485

This is not exacly what you were looking for, but it might be a valid second option if you don't find a good alternative.


What I did was to add the lines of code you showed to the startup script for the Python terminal (or console) in PyCharm.

The setting is located at

Settings >> Build, Execution, Deployment >> Console >> Python Console

See also my screenshot:

enter image description here

And there you can include some code lines that should be executed everytime you start the console.

Upvotes: 2

Related Questions