# Dataframe df column 'columnA' is any of the values 'value1', 'value2' df[df['columnA'].isin(['value1', 'value2'])]['columnB'] # SQL equivalent: SELECT columnB FROM df WHERE columnA IN ('value1', 'value2')