[TOC]
# 行
## 默認顯示多少行
~~~
import pandas as pd
# 打印默認顯示多少行
option = pd.get_option('display.max_rows')
print(option)
~~~
輸出
~~~
60
~~~
## 設置默認顯示行數
~~~
pd.set_option('display.max_rows', 6)
~~~
# 列
~~~
# 設置最大顯示的列
pd.set_option('display.max_columns', 6)
# 獲取某人顯示的列
option = pd.get_option('display.max_columns')
print(option)
~~~
輸出
6
# 字符串
~~~
# 設置默認顯示的字符串的長度
pd.set_option('display.max_colwidth', 6)
# 獲取默認顯示的字符串
option = pd.get_option('display.max_colwidth')
print(option)
~~~
輸出
6
# 顯示精度
~~~
# 設置顯示精度
pd.set_option('display.precision', 6)
# 獲取顯示精度
option = pd.get_option('display.precision')
print(option)
~~~
輸出
6