도록 해준다. 약간 추상적으로 말하면, 높은 차원의 데이터를 낮은 차원의 형식으로 다룰 수 있
게 해주는 기능이다. 간단한 예제를 하나 살펴보자. 우선 리스트의 리스트(또는 배열)를 색인
으로 하는
Series
를 하나 생성하자.
In
[
9
]:
data
=
pd
.
Series
(
np
.
random
.
randn
(
9
),
...:
index
=
[['
a
',
'
a
',
'
a
',
'
b
',
'
b
',
'
c
',
'
c
',
'
d
',
'
d
'],
...:
[
1
,
2
,
3
,
1
,
3
,
1
,
2
,
2
,
3
]])
In
[
10
]:
data
Out
[
10
]:
데이터 준비하기: 조인, 병합, 변형
CHAPTER
8
308
파이썬 라이브러리를 활용한 데이터 분석(2판 ...
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.