Skip to Content
파이썬 라이브러리를 활용한 데이터 분석(2판): 영화 평점, 이름 통계, 선거 데이터 등 실사례 사용
book

파이썬 라이브러리를 활용한 데이터 분석(2판): 영화 평점, 이름 통계, 선거 데이터 등 실사례 사용

by 김영근, 웨스 맥키니
June 2019
Beginner to intermediate
664 pages
18h 26m
Korean
Hanbit Media, Inc.
Content preview from 파이썬 라이브러리를 활용한 데이터 분석(2판): 영화 평점, 이름 통계, 선거 데이터 등 실사례 사용
620
파이썬 라이브러리를 활용한 데이터 분석(2판)
In
[
198
]:
indices
=
np
.
argpartition
(
arr
,
3
)
In
[
199
]:
indices
Out
[
199
]:
array
([
16
,
11
,
3
,
2
,
17
,
19
,
0
,
7
,
8
,
1
,
10
,
6
,
12
,
13
,
14
,
15
,
5
,
4
,
18
,
9
])
In
[
200
]:
arr
.
take
(
indices
)
Out
[
200
]:
array
([
-
2
.
0016
,
-
1
.
2962
,
-
0
.
5557
,
-
0
.
5194
,
-
0
.
3718
,
-
0
.
4386
,
-
0
.
2047
,
0
.
2817
,
0
.
769
,
0
.
4789
,
1
.
0072
,
0
.
0929
,
0
.
275
,
0
.
2289
,
1
.
3529
,
0
.
8864
,
1
.
3934
,
1
.
9658
,
1
.
669
,
1
.
2464
])
A.6.4
numpy
.
searchsorted
: 정렬된 배열에서 원소 찾기
searchsorted
는 정렬된 배열에서 이진 탐색을 수행해 새로운 값을 삽입할 때 정렬된 상태를
계속 유지하기 위한 위치를 반환하는 메서드다.
In
[
201
]:
arr
=
np
.
array
([
0
,
1
,
7
,
12
,
15
])
In
[
202
]:
arr
.
searchsorted
(
9
)
Out
[
202
]:
3
값이 담긴 배열을 넘기면 해당 원소별로 알맞은 위치를 담고 있는 배열을 반환한다.
In
[
203
]:
arr
.
searchsorted ...
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.
Start your free trial

You might also like

파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서

파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서

박해선, 안드레아스 뮐러, 세라 가이도

Publisher Resources

ISBN: 9791162241905