Series.between(left, right, inclusive='both')# 참조
import pandas as pd
# 데이터프레임 생성
cols = ['name', 'survived', 'pclass', 'fare', 'sex', 'age']
titanic = pd.read_excel('titanic3.xls', usecols=cols, index_col='name')
titanic
upper_20_mask = titanic['age'] >=20
lower_30_mask = titanic['age'] < 30
titanic[upper_20_mask & lower_30_mask]

**between** 메소드를 이용해 하나의 함수로도 20대를 찾을 수 있다.
age_20s_mask = titanic['age'].between(20,30,inclusive= 'left')
해당 코드를 확인해 보면 inclusive= 'left' 즉 20~30 사이에서 좌측값(20)을 포함하는 데이터를 갖는 함수를 만들었다.
