index = pd.Index(np.random.randint(0, 1000, 10))
positions = [0, 9, 3]
index[positions]
index.take(positions)
ser = pd.Series(np.random.randn(10))
ser.iloc[positions]
ser.take(positions)
frm = pd.DataFrame(np.random.randn(5, 3))
frm.take([0, 2], axis=1)
arr = np.random.randn(10)
arr.take([False, False, True, True]) # 動作するけど全部取れる
arr[[0, 1]]
ser = pd.Series(np.random.randn(10))
ser.take([False, False, True, True])
ser.iloc[[0, 1]]