numpy(2)
-
[python] numpy
Ver. Jupyter Notebook (Anaconda3) ▶ Numpy ndarray 개요 >>> import numpy as np # ndarray 생성 np.array() >>> list1 = [1, 2, 3] >>> print("list1:", list1) >>> print("list1 type:", type(list1)) list1: [1, 2, 3] list1 type: >>> array1 = np. array(list1) >>> print("array1:", array1) >>> print("array1 type:", type(array1)) array1: [1 2 3] array1 type: # ndarray의 형태(shape)와 차원 ## 1차원 >>> array1 = np.array(..
2021.05.03 -
[python] pandas
Ver. Jupyter Notebook (Anaconda3) ▶ pandas ● 데이터 유형 - 1차원(Series) : 한 줄 (행or열) - 2차원(Dataframe) : 두 줄 (행, 열) import pandas as pd# 시리즈, 데이터프레임 데이터분석 라이브러리 import numpy as np# 숫자, 행렬 라이브러리 ▶ Series: 1차원 데이터 - A one-dimensional labeled array capable of holding any data type s = pd.Series([3, -5, np.nan, 4], index=['a', 'b', 'c', 'd']) ▶ DataFrame (2차원 데이터) - A two-dimensional labeled data structure..
2021.04.28