【问题标题】:How to get PyCharm to display entire dataframes in the output console?如何让 PyC​​harm 在输出控制台中显示整个数据框?
【发布时间】:2019-06-29 20:25:55
【问题描述】:

我有一个包含 972 列的数据框,我试图查看所有列,但输出中的所有中间列都被截断。 我已经在调试器中尝试了视图变量,但它没有用。我只得到了前 30 年代的专栏。我也试过熊猫 display.width 也没有用。有人可以帮忙吗? 这是我的数据框:

【问题讨论】:

    标签: python pandas dataframe pycharm bioinformatics


    【解决方案1】:

    你可以在 pandas 中使用这个option

    pd.set_option('display.max_columns', None)
    

    或者你可以这样做:

    print(df.to_string())
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      • 2014-11-23
      • 1970-01-01
      • 2021-01-29
      • 2016-11-09
      • 2015-12-16
      • 1970-01-01
      相关资源
      最近更新 更多