【问题标题】:How to set the pandas dataframe output in pycharm console up/down alignment?如何在pycharm控制台上/下对齐中设置熊猫数据框输出?
【发布时间】:2018-09-19 13:26:52
【问题描述】:

在我使用之前

pd.set_option('expand_frame_repr', False)

pycharm 控制台中的 pandas 输出按行向上/向下对齐: alignment in rows

我想查看所有数据框列,所以我输入了:

pd.set_option('expand_frame_repr', True)

但在此之后,pycharm 控制台中数据框的输出不是按行向上/向下对齐,它显示为: dataframe in pycharm console is not up/down alignment in rows

输出太糟糕了,因为 pandas 数据框没有按行对齐,那么我该怎么做才能使行再次对齐?

【问题讨论】:

    标签: python pandas dataframe pycharm


    【解决方案1】:

    我遇到了同样的问题,刚刚找到了解决方法。

    这很简单,您需要取消选中 Pycharm 中运行终端旁边的 Use Soft Wraps 按钮。该按钮可以在这里找到:

    下面是两张截图,一张勾选了按钮,一张没有,我们可以看到它解决了问题!

    Screenshot : Use Soft Wraps checked

    Screenshot : Use Soft Wraps unchecked

    【讨论】:

      猜你喜欢
      • 2018-08-31
      • 2013-06-18
      • 1970-01-01
      • 1970-01-01
      • 2020-03-12
      • 2021-08-16
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      相关资源
      最近更新 更多