1. Pytorch 環境でのテンソルの不完全な表示
import torch
torch.set_printoptions(threshold=np.inf) # 为了以防万一,把这两行代码放到最前面
2.派手な表示が不完全
import numpy as np
np.set_printoptions(threshold=np.inf)
他の状況がある場合、基本的に違いは悪くありません。自分で調整できるのはこのコード行だけです。
3. パンダの表示が不完全
import pandas as pd
pd.set_option('display.width',None)
pd.set_option("display.max_rows", 1000)#可显示1000行
pd.set_option("display.max_columns", 1000)#可显示1000列
pd.set_option('display.max_rows', None)#显示全部行
pd.set_option('display.max_columns', None)#显示全部列
pd.options.display.max_rows = 300#显示300行
# 恢复默认
pd.reset_option("display.max_rows")#恢复默认设置