반응형 2차원 데이터1 [3주차 - Day3] Python으로 데이터 다루기 - Pandas Pandas 시작하기 Import pandas를 통해서 진행 import pandas as pd pandas로 1차원 데이터 다루기 - Series Series? 1-D labled array 인덱스를 지정해 줄 수 있음 s = pd.Series([1, 4, 9, 16, 25]) s 0 1 1 4 2 9 3 16 4 25 dtype: int64 t = pd.Series({'one':1, 'two':2, 'three':3, 'four':4, 'five':5}) t one 1 two 2 three 3 four 4 five 5 dtype: int64 Series + Numpy Series는 ndarrayd와 유사하다 s[1] 4 t[1] 2 t[1:3] two 2 three 3 dtype: int64 s[s .. 2023. 3. 31. 이전 1 다음 반응형