0315 Numpy

wldnjswldnjs·2022년 3월 21일

데이터 분석

목록 보기
1/11

1. python list와 Numpy ndarray 차이점

1. list

다른 데이터 타입 저장 [1, 2.3, 3, 4, True, 'Hello']

차원에 대한 개념 x

2. ndarray

같은 데이터 타입 저장 [1, 2.3, 3, 4, True, 'Hello']

ndarray : 차원에 대한 개념 존재

2. ndarray

1. 차원 관련 속성

2. type 변환 => astype()

3. ndarray를 만드는 다양한 함수들

1. np.array(), np.ones(), np.zeros(), np.full(), np.empty()

결과값

2. np.ones_like(), np.zeros_like(), np.full_like(), np.empty_like()

3. np.arange(), np.linspace()

4. ndarray를 만드는 랜덤값을 이용한 함수

np.random.normal(), np.random.rand(), np.random.randn(), np.random.randint(), np.random.random()

1. np.random.normal()

2. np.random.rand()

3. np.random.randn()

4. np.random.randint()

5. np.random.random()

6. random 관련 함수

1. seed()

2. shuffle()

3. choice()

5. shape과 관련 함수

1. reshape()


2. ravel()

3. resize()

데이터 유실의 가능성이 있으므로 잘 사용하지 않음.

6. Boolean Indexing & Fancy Indexing

1. indexing, slicing

1. Boolean Indexing

2. Fancy Indexing

0개의 댓글