1. 问题描述
横向出现省略号的问题得以解决,纵向的貌似问题依然存在。
列显示不全,且有省略号
解决办法:
具体代码:
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 100)
pd.set_option('display.width', 1000)
参考链接
https://blog.csdn.net/qq_46006468/article/details/119647052
2. 解决办法
要解决显示不全的问题,可以使用 pandas
库中的 pd.set_option
方法来设置显示选项。以下是具体的代码示例:
import pandas as pd
# 假设 df_Tai_LS_total 是你的 DataFrame
a = df_Tai_LS_total.describe().reindex()
# 设置显示选项
pd.set_option('display.max_columns', None) # 显示所有列
pd.set_option('display.max_rows', None) # 显示所有行
pd.set_option('display.width', 1000) # 设置显示的宽度
# 输出描述性统计信息
print(a)
以上代码通过设置 display.max_columns
和 display.max_rows
为 None
,可以确保显示所有列和行。