객체를 더할 때 짝이 맞지 않는 색인이 있다면 결과에 두 색인이 통합된다. 데이터베이스를 사용
해본 경험이 있다면 색인 라벨에 대한 외부 조인과 유사하게 동작한다고 생각할 수 있다. 예제
를 보자.
In
[
150
]:
s1
=
pd
.
Series
([
7
.
3
,
-
2
.
5
,
3
.
4
,
1
.
5
],
index
=
['
a
',
'
c
',
'
d
',
'
e
'])
In
[
151
]:
s2
=
pd
.
Series
([
-
2
.
1
,
3
.
6
,
-
1
.
5
,
4
,
3
.
1
],
.....:
index
=
['
a
',
'
c
',
'
e
',
'
f
',
'
g
'])
In
[
152
]:
s1
Out
[
152
]:
a 7
.
3
c
-
2
.
5
d 3
.
4
e 1
.
5
dtype
:
float64
In
[
153
]:
s2
Out
[
153
]:
a
-
2
.
1
c 3
.
6
e
-
1
.
5
f 4
.
0
211
5
장
pandas 시작하기
g 3
.
1
dtype
:
float64
이 두 객체를 더하면 다음과 같은 ...
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.