Getting wider output in PyCharm's built-in console

前端 未结 4 2060
情歌与酒
情歌与酒 2021-01-30 06:54

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

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 07:13

    For me, just setting 'display.width' wasn't enough in pycharm, it kept displaying in truncated form.

    However, adding the option pd.set_option("display.max_columns", 10) together with display width worked and I was able to see the whole dataframe printed in the "run" output.

    In summary:

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

提交回复
热议问题