jupyter中pandas与numpy显示全部数据

numpy显示全部数据

import numpy as np  
np.set_printoptions(threshold=np.inf)  
np.set_printoptions(threshold='nan')
其中threshold表示: 输出的数组数目

pandas显示全部数据

pd.set_option('display.max_columns', None) # 显示完整的列
pd.set_option('display.max_rows', None) # 显示完整的行
pd.set_option('display.expand_frame_repr', False) # 设置不折叠数据
pd.set_option('display.max_colwidth', 100)

猜你喜欢

转载自blog.csdn.net/Xu_Huitong/article/details/131032311
今日推荐