이제 데이터프레임의 처음 다섯 행을 출력하는 코드를 작성합니다. 신규 코드 셀을 추가한 다
음
heart
_
df
.
head
()
를 입력하고 실행합니다. 그러면 [그림
2
-
20
]과 같은 결과가 출력됩니다.
그림
2-20
데이터프레임의 처음 다섯 행(가독성을 위해 일부 열만 캡처함)
53
2
장
데이터의 중요성
이번에도 신규 코드 셀을 추가하고,
heart
_
df
.
info
()
를 입력한 다음 실행하여 데이터프레임
의 정보를 확인해 봅니다.
.
info
()
는 데이터셋에관한 정보를 제공하는 메서드입니다. 여기에
는 열의 개수, 이름,데이터 유형과 더불어 메모리 사용량, 범위 인덱스와 열별로 몇 개의 기록
이 존재하는지(널이 아닌 값
non
-
null
value
)에 관한 정보가 포함됩니다(그림
2
-
21
).
7
그림
2-21
출력된 데이터프레임 정보
.
info
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.