asked
Getting started with Python data analysis using public data
[4/15] Understanding the differences between retrieving row and column values with .loc and .iloc
Written on
·
210
1
cols.iloc[:5,:3] 는 왜 안될까요?
Answer 1
0
안녕하세요.
cols에 들어있는 값을 출력해 보세요.
DataFrame이 아니라면 질문 주신 방법처럼 데이터 색인을 할 수 없습니다.
.iloc[행, 열] 이기 때문입니다. .iloc[행] 도 가능합니다.