Pandas(2)
-
pandas 공분산, 정렬
약간 수학적인 함수 import numpy as np arr = np.array([4,6,1,3,8,8]) print(arr.sum()) # 합 print(arr.mean()) # 평균 5 # 편차( deviation ) : 확률변수 X와 평균의 차이 # -1 1 -4 -2 3 3 # 편차의 합은 => 0 # 편차의 제곱의 평균을 이용 => variance(분산) # 1 1 16 4 9 9 tmp = np.array([1,1,16,4,9,9]) print(tmp.mean()) # 6.666666666666667 print(arr.var()) # 6.666666666666667 분산 # 표준편차(standard deviation) : 분산의 제곱근(루트 - 분산을 구하는과정에서 제곱을했기 때문에) prin..
2021.08.21 -
pandas 기초
# Pandas에 대해서 알아보아요! pandas는 data분석 library의 최고봉!! # excel과 비슷하다 (data를 1g도 못불러들인다) # 잘만 이용한다면 excel보다 훨씬 다양한 일을 프로그램적으로 자동화 가능 # Pandas는 고유하게 정의된 2개의 자료구조를 가지고 있어요! # 1. Series : 1차원, 같은 데이터 타입을 사용해요! (ndarry 1차원에 조금 추가한거라고 생각?) # 2. DataFrame : 2차원, 여러개의 Series를 합쳐서 Table 구조로 만든 자료구조 # module 설치 # anaconda prompt에서 conda install pandas numpy 요소를 만들때 값을 모르겠어, 없어는 np.nan 을 이용 import numpy as np ..
2021.08.19