I\'m relatively new to using the PyCharm IDE, and have been unable to find a way to better shape the output when in a built-in console session. I\'m typically working with prett
The answer by @mattvivier
works nicely when printing Pandas dataframes (thanks!).
However, if you are printing NumPy arrays, you need to set np.set_printoptions
as well:
import pandas as pd
import numpy as np
desired_width = 320
pd.set_option('display.width', desired_width)
np.set_printoptions(linewidth=desired_width)
See docs on NumPy and set_printoptions.