파이썬(Python) 데이터프레임에서 생략없이 모든 행, 모든 열 보기
3월 09, 2023
In Python |
파이썬(Python) 데이터프레임에서 생략없이 모든 행, 모든 열 보기
크기가 큰 데이터프레임(DataFrame)을 출력하면 ... 으로 생략되어 나오기 때문에 가끔 데이터 확인이 불가능할 때가 있음
이럴때 변경 가능한 pandas 옵션 정리
행 관련 설정
# 모든 행 출력
pd.set_option('display.max_rows', None)
# 행 100개 출력
pd.set_option('display.max_rows', 100)
열 관련 설정
# 모든 열 출력
pd.set_option('display.max_columns', None)
# 열 100개 출력
pd.set_option('display.max_columns', 100)
# 표시할 가로의 길이
pd.set_option('display.width', 1000)
옵션 확인
# pandas 모든 옵션 보기
pd.describe_option()