pandas オプション設定

投稿者: | 2021-12-16

参考HP:pandasのオプション設定を確認・変更する方法

目次

Jupyter labの行列の最大値を設定する

# 設定
pd.set_option('display.max_rows', 100)
pd.set_option('display.max_columns', 500)

# 設定値を確認
pd.get_option('display.max_rows')
# 60
pd.set_option('display.max_columns')
# 20

デフォルトに戻す

print(pd.options.display.max_rows)
# 80

pd.reset_option('display.max_rows')

print(pd.options.display.max_rows)
# 60