series
2019. 12. 29. 11:04
import pandas as pd 선언 s1 = pd.Series([1, 3, np.nan, 2, 4]) s2 = pd.Series(np.arange(10)) dic3 = {"D":500, "E":400, "F":300} s3 = pd.Series(dic3) index 설정 s = pd.Series(np.random.randint(10, size=5), index=list("ABCDE")) A 6 B 3 c 0 D 8 E 4 데이터 확인 list(s.index), list(s.values) (['A', 'B', 'C', 'D', 'E'], [6, 3, 0, 8, 4]) string = "B" s.B, s["B"], s[string]..